This is a migrated thread and some comments may be shown as answers.

Datepicker automatically resets invalid date (month and day values)

1 Answer 1039 Views
DateInput
This is a migrated thread and some comments may be shown as answers.
Anthea
Top achievements
Rank 1
Anthea asked on 25 Mar 2019, 07:50 PM

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

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 27 Mar 2019, 01:01 PM
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.
Tags
DateInput
Asked by
Anthea
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or