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

Default time and interval is awkward

2 Answers 161 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
JohnVS
Top achievements
Rank 1
JohnVS asked on 23 Aug 2013, 04:30 PM
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 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 26 Aug 2013, 03:22 PM
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!
0
JohnVS
Top achievements
Rank 1
answered on 26 Aug 2013, 03:37 PM
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
Tags
Date/Time Pickers
Asked by
JohnVS
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
JohnVS
Top achievements
Rank 1
Share this question
or