DatePicker remember previous date?

6 posts, 0 answers
  1. Sanjeev
    Sanjeev avatar
    5 posts
    Member since:
    Jun 2015

    Posted 13 Jul 2015 Link to this post

    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.

    Steps:

    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?

    Thanks.

  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3718 posts

    Posted 15 Jul 2015 Link to this post

    Hello Sanjeev,

    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:
    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Sanjeev
    Sanjeev avatar
    5 posts
    Member since:
    Jun 2015

    Posted 15 Jul 2015 in reply to Georgi Krustev Link to this post

    Thank you that worked!!
  4. Mohamed
    Mohamed avatar
    15 posts
    Member since:
    May 2015

    Posted 22 Jun Link to this post

    Can you put an updated example? the link is not working.

    Thanks,

  5. Preslav
    Admin
    Preslav avatar
    163 posts

    Posted 26 Jun Link to this post

    Hi Mohamed,

    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.


    Regards,
    Preslav
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  6. Mohamed
    Mohamed avatar
    15 posts
    Member since:
    May 2015

    Posted 26 Jun in reply to Preslav Link to this post

    it works fine, thanks a lot
Back to Top