24hour options clock on DateTimePicker

1 Answer 48 Views
DateTimePicker
SoH
Top achievements
Rank 1
Veteran
SoH asked on 24 May 2021, 10:52 AM

This is how the Kendo DateTimePicker is being implemented

<input 
   ng-disabled="isDisabled"
   k-ng-model="viewmodel"
   k-format="'dd/MMM/yyyy HH:mm'"
   k-timeFormat="'HH:mm'">

However my dropdown Time options appear as; 5:30AM, 8:30PM, etc.    (12hour format)

When a date & time are selected, they appear as 24/May/2021 05:30, 24/May/2021 20:30       (24hour format)

How can I change the dropdown options to 24hour format?

1 Answer, 1 is accepted

Sort by
0
Georgi Denchev
Telerik team
answered on 27 May 2021, 07:24 AM

Hi,

Your approach is correct, you should use the timeFormat configuration, however in angularJS properties which consist of multiple words should be split with dashes and they should be lowercase.

<input 
   ng-disabled="isDisabled"
   k-ng-model="viewmodel"
   k-format="'dd/MMM/yyyy HH:mm'"
   k-time-format="'HH:mm'">

More information can be found here:

https://docs.telerik.com/kendo-ui/framework/AngularJS/widget-basics/initialization#using-html-options 

Best Regards,
Georgi Denchev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
DateTimePicker
Asked by
SoH
Top achievements
Rank 1
Veteran
Answers by
Georgi Denchev
Telerik team
Share this question
or