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

Disable alpha input / validation

1 Answer 49 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 10 Dec 2013, 05:24 PM
I've read through the API and was wondering if there is a way to only allow dates to be selected from the calendar OR a real date typed in.  Currently someone could type in "Bill" or "I want to type an alphanumeric sentence"...  I'd like to prevent someone from even entering anything except for a valid date.

I am currently validating this value after the fact and then alerting the user they have entered an invalid date, but just want to be able to cut out that step (or at least part of it) if possible.

Thanks
Jason

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 11 Dec 2013, 03:24 PM
Hello Jason,

In general, the DatePicker widget is designed to allow typing a string or picking a date from popup calendar. It supports multiple parse formats. Because of this functionality the user's input should not be restricted and the developer needs to validate the written text using а validator framework. Thus the user will get more descriptive information about the error and its cause.

Regards,
Georgi Krustev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Date/Time Pickers
Asked by
Jason
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or