I have couple of DateTimePicker in my ASP.NET project. I am running into issue where DateTime picker keeps remembering old selected date in my MVC page.
1) Choose any future date from DateTimePicker control. e.g. 1/1/2020
2) Clear the date in the Textbox so that there is no date value.
3) Now, try clicking on DateTimePicker control, it will show 1/1/2020 instead of present date.
Does anyone know how to reset the date to current date once the DatePicker textbox is cleared?
5 Answers, 1 is accepted
The DatePicker widget is designed to clear the selected date in the calendar once the textbox is cleared, but it will not move the calendar to present date. This behavior is intended.
If you would like to navigate the calendar to a specific date, then you will need to do that manually:
Can you put an updated example? the link is not working.
We were experiencing issues with our Dojo code services. Now, the link should load as expected.
Please, check the Dojo and let me know if it loads on your side.