Our pure JavaScript Scheduler component


Post by Softhouse »

Hi!
When stepping to latest Bryntum version (5.3.1) I encountered an issue with locales.
I followed the migration guide for locales so the config should be correct and applied in the right order.

We want to use the existing locale "En" and only update the DateHelper locale to "sv-SE".
This is done with this code:

LocaleManager.applyLocale({
  localeName: "En",
  DateHelper: {
    locale: "sv-SE",
    weekStartDay: 1
  }
});

This publishes the locale and then we apply the locale wit:

LocaleManager.applyLocale("En");

The issue we are encountering is that the locale for the DateHelper is applied but not used.
When I log the locale object with:

LocaleHelper.locales

I can see that the existing "En" locale has the updated DateHelper, but the dates and time format in Bryntum are not updated to Swedish time date locale.

To work around the issue we have to apply another locale and then apply the "En" locale again to get Bryntum to use the Swedish date locales.

The resulting application of locales then looks like this.

LocaleManager.applyLocale({
  localeName: "En",
  DateHelper: {
    locale: "sv-SE",
    weekStartDay: 1
  }
});
LocaleManager.applyLocale("own_locale", {});
LocaleManager.applyLocale("En");

Post by marcio »

Hey,

Thanks for the detailed report, I was able to reproduce that, and created a ticket to fix that https://github.com/bryntum/support/issues/6450

Best regards,
Márcio


Post Reply