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

dateTime picker format not working correctly with european format

5 Answers 723 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
fred
Top achievements
Rank 1
fred asked on 28 Aug 2012, 09:44 AM
The date time picker doesn't work with european date and time format. The time dropdown shows AM/PM format but the field populates properly with 24 hours format.

Code and screen shots attached.

5 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 28 Aug 2012, 12:50 PM
Hello,

 
You need to define the time format of the drop-down popup.

Regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
fred
Top achievements
Rank 1
answered on 28 Aug 2012, 12:59 PM
I have tried that too. I used the code below and still get the correct format in the dropdown but not in the input field.

 $("#datetimepicker").kendoDateTimePicker({interval: 60, dateFormat: "dd/MM/yyyy", timeFormat: "HH:mm"});
0
Georgi Krustev
Telerik team
answered on 29 Aug 2012, 09:04 AM
Hello fred,

 
Everything works fine on my end. Here is a simple jsBin demo, which shows that everything works as expected.

All the best,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
fred
Top achievements
Rank 1
answered on 29 Aug 2012, 09:27 AM
Thanks. that works but I find the documentation lacking clarity. Why is the time included int the "format" parameter is there is a "timeFormat" parameter? What does upper case signify? What does "tt" mean? What is the significance of the "ss" as in second? They are never displayed.
0
Georgi Krustev
Telerik team
answered on 29 Aug 2012, 11:03 AM
Hi,

 
The format option is used to format the DateTimePickers value and display it in the input element. The timeFormat option is used to define the format of the items in the drop-down popup. There are two options, because you may want different format for the drop-down popup then the default's culture short time format. I believe that the pointed links describes well the purpose of the options.

As to the formats I strongly suggest you check this help topic (and other related help articles), which will shed more light on your last question.

All the best,
Georgi Krustev
the Telerik team
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
fred
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
fred
Top achievements
Rank 1
Share this question
or