angular / angular/components

bug(mat-datepicker): calendar with startAt attribute will not update on manual input

オープン
#28,814 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る
area: material/datepicker P4
主要言語
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

I built a mat-datepicker with startAt property (e.g. 01/01/2024).
Calendar starts as described in documentation at demanded calendar page.
If input value is changed, calendar will not update to desired page. (e.g. date is changed to 05/05/2024, calendar page is still on January 2024 instead of May 2024)

### Reproduction

StackBlitz link: https://stackblitz.com/edit/datepicker-property-error
Steps to reproduce:
1. Change input to any other date (e.g. 5/5/2024) either by typing or selection on calendar.
2. (Re-)Open calendar.

### Expected Behavior

Calendar should switch to page of desired month (e.g. May 2024).
startAt property should only set initial date and react accordingly to changes.

### Actual Behavior

Calendar does not change its page according to the input date. It remains on startAt date.

### Environment

- Angular: v17
- CDK/Material: 17.3.1
- Browser(s): Chrome, Firefox
- Operating System (e.g. Windows, macOS, Ubuntu): Windows

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、リンクされた StackBlitz で動作を再現し、mat-datepicker のエントリポイントを調べて、startAt と手動入力が表示される月にどのように影響するかを確認します。新しい日付を入力または選択し、カレンダーを再度開いたときに入力した日付の月が表示され、startAt は初期ページのみを制御することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。