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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Datepickerfor not setting default value

Thread ID:





131603 Jul 19,2017 07:35 AM UTC Jul 20,2017 11:33 AM UTC ASP.NET MVC 1
Tags: DatePicker
ritesh kumar
Asked On July 19, 2017 07:35 AM UTC

Dear Team,
I am facing issue with datepickerfor , i created a demo project in which  for date field i use datepickerfor and strongly bind  with model and assing Dynamic id to control, for get the change date i use client side event and create a function for get change date , now if i change date in controller i got changed date , but if i dont change date then i get datepicker val empty  

Deepa Loganathan [Syncfusion]
Replied On July 20, 2017 11:33 AM UTC

Hi Ritesh,     
Thanks for contacting Syncfusion support.     
From your query, we suspect that you would like, the Datepicker to be rendered with a default value set from Model and trigger the change event in client side when the DatePicker value changes.   
 We have created a sample based on the requirement and we were not able reproduce the reported issue (empty value received in change event).   
For your convenience, we have updated a sample in the given link.    
Also, the change event will be triggered only when the value of the Datepicker changes (in User Interaction or when value is changed in code behind).  
The default value of DatePicker is null. So if no value will be set by default in Datepicker.  
For more details, please follow the below link.    
If this is not the scenario, revert with a modified sample to reproduce the issue, so that we could provide you the prompt response.  
Deepa L.  


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon