Default time and interval is awkward

3 posts, 0 answers
  1. JohnVS
    JohnVS avatar
    76 posts
    Member since:
    Apr 2013

    Posted 23 Aug 2013 Link to this post

    We have been noticing that the DateTime widget, by default, selects the current date and time. And obviously, the time intervals are based on this default time. But this leads to some awkward behavior. Say the time is currently 1:18pm. The intervals the user can pick from are 1:18pm, 2:18pm, and so on. It's quite strange to think of the user choosing to schedule their appointment at 2:18pm.

    It would be much nicer if the intervals could be at every 00, every 15, every 30, etc. Something like that. Is that possible? I'm assuming there's no way to do this with built-in behavior, but is there another way? Thanks.
  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 26 Aug 2013 Link to this post

    Hi John,


    Please note that this behavior is expected and only observed when the DateTimePicker's min property is set, however I made a small example demonstrating the behavior you are looking for.


    Regards,
    Alexander Popov
    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. JohnVS
    JohnVS avatar
    76 posts
    Member since:
    Apr 2013

    Posted 26 Aug 2013 Link to this post

    Ah, gotcha. So you just have to do it programmatically.

    We are using the MVC Wrappers, so we ended up using a DateTime extension with setting the Min property to make it round up the minutes. If anyone else is interested in doing this, see this StackOverflow post: http://stackoverflow.com/questions/7029353/c-sharp-round-up-time-to-nearest-x-minutes
Back to Top