angular / angular/components

bug(mat-date-range-picker): MatEndDate dateChanged is triggered by changes to start and end date

オープン
#19,806 コメント 1 件 リアクション 8 件 担当者 0 名 GitHub で見る
area: material/datepicker P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

#### Reproduction

Stackblitz demo:

https://components-issue-aypuzh.stackblitz.io

Steps to reproduce:
1. Create a MatDateRangePicker as shown in the docs
2. Add the dateChanged attribute to matStartDate or matEndDate
3. Start to change dates

#### Expected Behavior

What behavior were you expecting to see?

That the date changed attribute on matEndDate is only triggered when you change the end date. Or a way to detect when both start and end date have successfully been set.

#### Actual Behavior

What behavior did you actually see?

The date changed attribute on matEndDate is triggered both when you change the start and end date.
#### Environment

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

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

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

調査の方向性

リンクされた StackBlitz の再現例と、MatDateRangePicker に関する Angular Material ドキュメントの例から始め、matStartDate と matEndDate の dateChanged ハンドラーに注目してください。各日付を変更しながらイベントの順序を再現します。matEndDate ハンドラーが終了日の変更に対してのみ発火すること、または両方の日付が設定されたことを検出するサポートされた方法が文書化されていれば完了です。

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

評価

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

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

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