Skip to content

moment: use this.locale when specified#630

Merged
dmtrKovalenko merged 1 commit into
dmtrKovalenko:masterfrom
alexfauquette:fix-moment-locale
Oct 19, 2022
Merged

moment: use this.locale when specified#630
dmtrKovalenko merged 1 commit into
dmtrKovalenko:masterfrom
alexfauquette:fix-moment-locale

Conversation

@alexfauquette

@alexfauquette alexfauquette commented Oct 19, 2022

Copy link
Copy Markdown
Contributor

Related to mui/mui-x#6547

When importing multiple locales, the default moment local is the last one.

The adapter.getFormatHelperText() will apply the default moment locale instead of the one provided to the adapter.

Fixed by

-this.moment.localeData()
+this.moment.localeData(this.getCurrentLocaleCode())

@dmtrKovalenko
dmtrKovalenko merged commit 44bfe7d into dmtrKovalenko:master Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants