Our pure JavaScript Scheduler component


Post by nsarvesh14 »

When we load bryntum page in local UI Date format is MM/DD same code deployed in Environment serve it is showing DD/MM format Please find the screenshot. we need MM/DD format. How can we customize bryntum date format?

Attachments
Environment Date DD/MM
Environment Date DD/MM
QA dateCapture.JPG (114.29 KiB) Viewed 385 times
Local Date format MM/DD
Local Date format MM/DD
local dateCapture.JPG (110.3 KiB) Viewed 385 times

Post by pmiklashevich »

Hello,

dateFormat defines how the header date will be formatted. Some of predefined in PresetManager ViewPresets use the format which relies on local machine locale. You can check out this table to see what those formats are: https://www.bryntum.com/docs/scheduler/#Core/helper/DateHelper#formatting-dates

Снимок экрана 2020-11-24 в 17.31.08.png
Снимок экрана 2020-11-24 в 17.31.08.png (125.12 KiB) Viewed 380 times

Beside that ViewPresets support date format localization. If you check out Scheduler/lib/Scheduler/localization/En.js file you'll see what header levels for which presets are localized.

Снимок экрана 2020-11-24 в 17.32.52.png
Снимок экрана 2020-11-24 в 17.32.52.png (109.69 KiB) Viewed 380 times

Therefore, if the format you see on your local machine and on production is different, it means one of the date formats depends on the localization. So, you need to override localization for the viewpreset you need as it's shown in this guide: https://www.bryntum.com/docs/scheduler/#guides/customization/localization.md#create-a-custom-locale See "Change date formats" chapter.

Best,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply