angular / angular/components

bug(datepicker): monthSelected doesn't actually update formControl if calendar view closed before picking a date in the month

オープン
#30,463 コメント 0 件 リアクション 0 件 担当者 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

When opening a 'monthView' and closing a calendar in monthSelected event, pre-setting formControl value, its actually not changed. Its visible from the example I attached

### Reproduction

StackBlitz link: https://stackblitz.com/edit/c5ckw68f?file=src%2Fexample%2Fdatepicker-views-selection-example.html,src%2Fexample%2Fdatepicker-views-selection-example.ts,src%2Fexample%2Fdatepicker-views-selection-example.css
Steps to reproduce:
1. Select a different month in the calendar
2. Check the output values

### Expected Behavior

formControl value has a selected month

### Actual Behavior

formControl value doesn't change

### Environment

- Angular: 19.1.3
- CDK/Material: 19.1.3
- Browser(s): Chrome (all basically)
- Operating System: Windows

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

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

調査の方向性

StackBlitz の再現から始め、特に src/example/datepicker-views-selection-example.html と src/example/datepicker-views-selection-example.ts を確認し、monthSelected イベントからカレンダーを閉じることで monthView のフローを再現します。datepicker の form-control の更新経路を追跡し、カレンダーを閉じた後も月を選択すると formControl に選択した月が残ることを確認します。

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

評価

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

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

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