We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

DatePicker loses value with server validation

Thread ID:

Created:

Updated:

Platform:

Replies:

108975 May 23,2013 05:03 PM May 30,2013 12:04 AM ASP.NET MVC (Classic) 2
loading
Tags: Tools
Greg Quinn
Asked On May 23, 2013 05:03 PM

In case anybody runs into this common scenario, here is the fix...

[Controller]

[HttpPost]

        public ActionResult Index(EditorValidation e)

        {

            ViewBag.Message = 'Welcome to ASP.NET MVC!';

            DatePickerModel model = new DatePickerModel();

            model.DisplayDefaultDateOnLoad = true;

            ViewData["datemodel"] = model;

            return View();

        }

[View]

@Html.Syncfusion().DatePickerFor(model => model.DateTimeValue, (DatePickerModel)ViewData["datemodel"])



John Hind
Replied On May 24, 2013 06:44 AM

It should be set to true by default anyway. I spent many hours trying to make it work until I found this setting. It is more likely that you would want it to be set to true. Come on Syncfusion !


Varalakshmi R.S [Syncfusion]
Replied On May 30, 2013 12:04 AM

Hi John,

 

Thanks for sharing the details with us.

 

Kindly get back to us if you have any other queries.

 

Regards,

Varalakshmi

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;