bug(Datepicker): Datepicker with Moment ignores locale
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 91
Description
### Is this a regression?
- [X] Yes, this behavior used to work in the previous version
### 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:
1. Open the datepicker to select a date
2. Select a year and a month
### 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
- Angular: 17.0.6
- CDK/Material: 17.0.3
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 11
Contributor guide
Research direction
Start with the linked StackBlitz reproduction and the mat-datepicker configured with Moment and a German locale. Compare the behavior between Angular 16 and Angular 17, then trace the datepicker's locale handling to identify why month names fall back to English. Done means the reproduction displays German month names after the upgrade and the regression is covered by the project's relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100