-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
bug(Datepicker): Datepicker with Moment ignores locale #28263
Comments
We have the same problem. Do you use the new ESbuild builder? |
Yes, we do |
I guess it's a Problem with that. Can't find the Issue Link rn but will provide it later. Since the ESBuild Builder, the default locale is always 'en_US' |
Okay, but can we fix that somehow or is it in fact a bug? |
Didn't find a way yet. We reverted back to Webpack for the moment |
Same issue here, with my newly migrated app to Angular 17, using the new Vite builder. I cannot find the other issue you're talking about @jahusa02 but I'd be glad to read it as well in case I could provide a workaround! EDIT: I ran a few tests. It seems the bug comes from Moment library in fact: the method |
So, do you guys think this bug will be adressed soon? I really don't want to go back to Angular 16 or the old builder. |
I can't find it anymore 😅 sorry. |
Hmm I tried removing |
You can use a workaround like: This way the locales get compiled and work again. |
Had the same issue. |
Thank you @CodingMonkeyN ! This works :) |
Have the same issue but I don't understand this workaround. |
You need to adjust your imports where you normally import Moment with the import specifying the wanted locales. |
Is this a regression?
The previous version in which this bug was not present was
16
Description
Since updating to Angular 17, my mat-datepicker ignores my locale. Everything should be in German but instead it's all in English now.
Reproduction
StackBlitz link: https://components-issue-uudyxr.stackblitz.io
Steps to reproduce:
Expected Behavior
The months are displayed in German (screenshot taken from production environment that doesn't have the update to Angular 17 yet).
Actual Behavior
The months are displayed in English
Environment
The text was updated successfully, but these errors were encountered: