Input Validation For DatePicker

4 posts, 1 answers
  1. Brian Roth
    Brian Roth avatar
    136 posts
    Member since:
    Oct 2005

    Posted 16 Dec 2015 Link to this post

    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!

  2. Answer
    Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1798 posts

    Posted 17 Dec 2015 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Brian Roth
    Brian Roth avatar
    136 posts
    Member since:
    Oct 2005

    Posted 17 Dec 2015 in reply to Konstantin Dikov Link to this post

    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

  5. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1798 posts

    Posted 21 Dec 2015 Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready