Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when updating and applying existing locale #6450

Open
marciogurka opened this issue Mar 23, 2023 · 0 comments
Open

Error when updating and applying existing locale #6450

marciogurka opened this issue Mar 23, 2023 · 0 comments
Labels
bug Something isn't working forum Issues from forum

Comments

@marciogurka
Copy link

Forum post

"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 with:

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");

```"

If you go to any Scheduler Pro demo, like the inline data, and try to run the applyLocales just like the user mentioned, you get the same behavior.
@marciogurka marciogurka added bug Something isn't working forum Issues from forum labels Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum
Projects
None yet
Development

No branches or pull requests

1 participant