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

[React] Localization format not applies on timeAxis ticks when change locale at runtime #4014

Open
chuckn0rris opened this issue Jan 13, 2022 · 0 comments
Labels
bug Something isn't working forum Issues from forum OEM OEM customer

Comments

@chuckn0rris
Copy link

Forum post

Reproduced on very simple React app :

import "@bryntum/calendar/calendar.classic.css"; 
import React from 'react';

import { LocaleManager } from "@bryntum/calendar/calendar.umd.js";
import { BryntumCalendar } from "@bryntum/calendar-react";
import { Component, createRef } from 'react';
import BryntumCalendarNl from "@bryntum/calendar/locales/calendar.locale.Nl";
import BryntumCalendarRu from "@bryntum/calendar/locales/calendar.locale.Ru";

LocaleManager.registerLocale('Nl', { locale : BryntumCalendarNl });
LocaleManager.registerLocale('Ru', { locale : BryntumCalendarRu });

window.LocaleManager = LocaleManager;
LocaleManager.applyLocale('Nl');

class App extends Component {
  calendar = createRef(null);

  render() {
    const { calendar } = this;

    const calendarConfig = {
      style: "height: 100%",
      ref: calendar,
      weekStartDay: 1
    };

    return (
      <div className="App">
        <BryntumCalendar {...calendarConfig} />
      </div>
    );
  }
}

export default App;

Try in console:

LocaleManager.applyLocale('En')

See that time format hasn't been updated to AM/PM format. Try to refresh the view using month switch buttons or any other way, see that format has been applied.

Screenshot 2022-01-13 at 21 09 02

@chuckn0rris chuckn0rris added bug Something isn't working forum Issues from forum OEM OEM customer labels Jan 13, 2022
@isglass isglass added this to the 5.0.x milestone Jan 13, 2022
@SergeyMaltsev SergeyMaltsev modified the milestones: 5.0.x, 5.1.x Jul 21, 2022
@SergeyMaltsev SergeyMaltsev modified the milestones: 5.1.x, 5.2.x Oct 13, 2022
@isglass isglass removed this from the 5.2.x milestone Feb 20, 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 OEM OEM customer
Projects
None yet
Development

No branches or pull requests

3 participants