bug(MatDatePicker): NativeDatePicker not using the correct format initially
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
### Is this a regression?
- [ ] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
_No response_
### Description
When I use the following setup:
```
provideNativeDateAdapter({
parse: {
dateInput: 'DD.MM.YYYY',
},
display: {
dateInput: 'DD.MM.YYYY',
monthYearLabel: 'MMM YYYY',
dateA11yLabel: 'LL',
monthYearA11yLabel: 'MMMM YYYY',
},
}),
{
provide: LOCALE_ID,
useValue: 'de-CH'
},
```
the DatePicker will show the date in the wrong format: "13.5.2025" instead of "13.05.2025". Why are the format options ignored?
### Reproduction
StackBlitz link:
Steps to reproduce:
1.
2.
### Expected Behavior
Date is formatted as "13.05.2025".
### Actual Behavior
Date is formatted as "13.5.2025".
### Environment
- Angular: 19.1.4
- CDK/Material: 19.1.5
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 11
コントリビューションガイド
調査の方向性
Issue に示されている NativeDatePicker と provideNativeDateAdapter の設定から始め、de-CH ロケールと指定された dateInput 形式を使用します。初期表示を再現し、設定した形式が無視される理由を追跡します。picker が最初に日付を "13.05.2025" と表示すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100