angular / angular/components

feat(MatDateRangePicker): Add selection event

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

説明

### Feature Description

Add the ability to be notified when the date range selection change but is not yet applied.

The _dateChange_ output of MatDatepickerInput is not a solution because it notify once the range changed AND applied.

Similar to the outputs _monthSelected_ or _yearSelected_ we already have, it could be _rangeSelected_.

### Use Case

A use case for this is would be to preview the current range selection.

For example, because the datepicker it is not a double calendar (like the one in #20613), it is difficult to see when the range starts or end when it spread over several months.

![image](https://github.com/angular/components/assets/1118107/b2e7f5dd-2596-4ca2-8a94-b28344ffb008)

In the meantime, the hack I found is to override the DefaultMatCalendarRangeStrategy with an observable that I reinject in my component to be notified when the range change.

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

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

調査の方向性

まず、既存の monthSelected および yearSelected の出力と MatDatepickerInput の dateChange の動作を比較し、次に MatDateRangePicker と DefaultMatCalendarRangeStrategy を調査します。コンシューマーがドキュメント化された rangeSelected 出力を通じて未適用の範囲選択を確認でき、関連するコンポーネントテストでその動作がカバーされた時点で作業完了です。

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

評価

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

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

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