I'm using the Kendo UI DateTimePicker to accept user input for a 30 minute period of a day. I am specifying a 30 minute interval explicitly (30 is default anyway) and I am using the format and timeFormat options to specify the 24 hour time format as you can see below.
When selecting the time drop down list I would like the values to start at 00:30 and go to 24:00 rather than the usual behaviour of starting at 00:00 and going to 23:30. Although using 24:00 to indicate midnight / the end of the day isn't that common in user interfaces, the Wikipedia article on the 24 hour clock indicates our requirement is not unheard of.
I've had a pretty good look through the DateTimePicker API documentation but I can't find any "officially supported" way to do this. Any ideas to help me as I start to dive into the JavaScript guts of the widget? I also wonder if I could hack it by using a different culture?
To see a working example I've created a sample JSFiddle
$("#periodInput").kendoDateTimePicker({
format: "dd/MM/yyyy HH:mm",
timeFormat: "HH:mm",
interval: 30
});
This Kendo UI Forums posting "TimePicker does not conform to IS0 8601 3.5.2 on Time of Day midnight representations" describes the underlying problem. My attempted summary is:
It seems to me that to solve this problem using the DateTimePicker, I would be hacking away at the Kendo code at a pretty low level. While that sounds like fun, it's probably not appropriate value for my project at the moment.
After reviewing the requirements I have replaced the DateTimePicker widget with a DatePicker and a separate DropDownList. Using a separate DropDownList allows me to bind to a list of time periods that are not JavaScript Date objects and I can display a text representation of 24:00 to indicate the final half hour of the day.