KendoDateTimePicker has bug with 24 hour format

2 posts, 0 answers
  1. JOHNY
    JOHNY avatar
    9 posts
    Member since:
    Oct 2012

    Posted 25 Feb 2014 Link to this post

       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

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

  2. Georgi Krustev
    Georgi Krustev avatar
    3688 posts

    Posted 26 Feb 2014 Link to this post

    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.

    Georgi Krustev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top