Our pure JavaScript Scheduler component


Post by jeffrey1994 »

We would like to control whether date-times are shown as 12-hour time or 24-hour time. Currently this is based on the locale, but even if the locale is set to en-US we would like the option of displaying hours in 24 hour format regardless of the locale.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat
See "hour12" option above.

Is this possible? Maybe this could be made configurable in the DateHelper class?


Post by Maxim Gorkovsky »

Hello.
You need to configure view preset as it is the one controlling date format. This one defines date format for tooltips https://www.bryntum.com/docs/scheduler/#Scheduler/preset/ViewPreset#field-displayDateFormat and this one for timeline header https://www.bryntum.com/docs/scheduler/#Scheduler/preset/ViewPresetHeaderRow#config-dateFormat
For date formatting option refer to this doc: https://www.bryntum.com/docs/scheduler/#Core/helper/DateHelper


Post Reply