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

Input Validation For DatePicker

3 Answers 251 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Brian Roth
Top achievements
Rank 1
Brian Roth asked on 16 Dec 2015, 04:15 PM

I noticed that you can input "12:00 AM" into a datepicker without setting off an input validation error. If a data-role is specified as a "datepicker", shouldn't Kendo have some out of the box validation on time inputs?

 

Here is a Kendo demo that allows you to input time: http://demos.telerik.com/kendo-ui/validator/custom-validation

 

Thanks!

3 Answers, 1 is accepted

Sort by
0
Accepted
Konstantin Dikov
Telerik team
answered on 17 Dec 2015, 03:49 PM
Hello Brian,

When you enter a valid hour, the DatePicker will select the current date by setting the hours from the user's input. If you need to further limit the valid date inputs you can use custom validation as in the following example:
Hope this helps.


Regards,
Konstantin Dikov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Brian Roth
Top achievements
Rank 1
answered on 17 Dec 2015, 09:07 PM

I'll go ahead and use custom logic then.

However, I still do think the expectation should be:

+ DatePicker : only a date

+ TimePicker: only a time

+ DateTimePicker: both

Thanks,

Brian

0
Konstantin Dikov
Telerik team
answered on 21 Dec 2015, 09:52 AM
Hello Brian,

If you think that the validation should be specific to each widget, you could create a feature request in our feedback portal and if it receives enough votes, our developers could consider such implementation in future releases: 

Best Regards,
Konstantin Dikov
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
Brian Roth
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Brian Roth
Top achievements
Rank 1
Share this question
or