Datepicker automatically resets invalid date (month and day values)

2 posts, 0 answers
  1. Anthea
    Anthea avatar
    2 posts
    Member since:
    Mar 2011

    Posted 25 Mar 2019 Link to this post

    Hi there,

    By default, the datepicker control automatically resets the value if manually entering an invalid day, or month value) . I.e. if day = '43' it changes it to '03', if month = '14' it changes it to '4').

    Is it possible to simple show an "invalid date" message in this case so that the user is aware that a correction is needed? The control currently picks a valid value so the user is not aware that they entered an invalid date.

    Thanks,

    Anthea

  2. Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    1279 posts

    Posted 27 Mar 2019 Link to this post

    Hi Anthea,

    Indeed, our initial intent was to add an auto correcting behavior out-of-the-box for convenience, but it seems many developers expect the end user to be able to type an invalid date segment, and only a validation error to be triggered, as opposed to switching to a valid value automatically.

    This is why we logged an enhancement item to our public GitHub repository that you can track here:

    https://github.com/telerik/kendo-angular/issues/2008

    We will do our best to address this as soon as possible, and the GitHub thread will be updated accordingly.

    Regards,
    Dimiter Topalov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top