KendoDateTimePicker has bug with 24 hour format

1 Answer 1457 Views
Date/Time Pickers
JOHNY
Top achievements
Rank 1
JOHNY asked on 25 Feb 2014, 05:03 PM
Hello,
   I have noticed this bug during our development.
I have a html input like this set to 10/10/2011 3:35PM
<input id="datepicker" value="10/10/2011 3:35PM" style="width:250px;" />

Now I change this to a kendoDateTimePicker with 24 hour time format.
                $("#datepicker").kendoDateTimePicker({format: "MM/dd/yyyy HH:mm", parseFormats: ["MM/dd/yyyy", "HH:mm"],  timeFormat: "HH:mm" });

however the time is showing as 3:35 instead 15:35 in 24 hour format.

I have created and example at jsbin 

http://jsbin.com/tupof/8/edit

It is critical for our development to fix this issue and appreciate any help to resolve this issue as soon as possible.

Thanks

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 26 Feb 2014, 02:43 PM
Hello Johny,

The DateTimePicker, and Kendo date parsing in general, supports 12 hour format and 24 hour format. In order to parse 12 hour time format you will need to use lowercase "h" literal. The uppercase "H" is used for 24 hour time format. You can find more information about the difference between date format literals here. I updated the jsBin demo and everything works as expected.

Regards,
Georgi Krustev
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
JOHNY
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or