How do I change to a 24-hour format? Now it's in AM/PM mode.
Support Forum
Please see localization guide: https://www.bryntum.com/docs/scheduler/#guides/customization/localization.md#change-date-formats
All formats are listed here: https://www.bryntum.com/docs/scheduler/#Core/helper/DateHelper
Pavlo Miklashevych
Sr. Frontend Developer
thanks!
this worked for me:
const locale = {
// ... Other translations here ...
PresetManager: {
// Translation for the "weekAndDay" ViewPreset
hourAndDay: {
// Change the date format for the top and middle levels
//topDateFormat: 'MMM',
middleDateFormat: 'HH:mm'
},
}
}
LocaleManager.extendLocale('En', locale);
HI eugenem,
I am not sure I got your question. Did you change DateHelper
locale as it recommended in the guide?https://www.bryntum.com/docs/scheduler/#guides/customization/localization.md#change-date-formats
const locale = {
DateHelper : {
locale : 'es-ES'
}
}
LocaleManager.registerLocale('Es', { desc : 'Spanish', locale : locale });
All build-in editors and inputs are using the current locale date format that depends on the locale of your browser/OS according to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat
All the best,
Alex
const locale = {
// ... Other translations here ...
PresetManager: {
// Translation for the "weekAndDay" ViewPreset
hourAndDay: {
// Change the date format for the top and middle levels
//topDateFormat: 'MMM',
middleDateFormat: 'HH:mm'
},
},
DateHelper: {
locale: 'en-GB'
}
}
LocaleManager.extendLocale('En', locale);
Ok, this seems to work. But if I want to change here date format to d.m.Y, how would I do it? I'm not sure there is an EN locale variant for that.