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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Datepickerfor not setting default value

Thread ID:

Created:

Updated:

Platform:

Replies:

131603 Jul 19,2017 07:35 AM UTC Jul 20,2017 11:33 AM UTC ASP.NET MVC 1
loading
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.    
Sample   
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.  
Regards,    
Deepa L.  


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.

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

;