feat(MatDateRangePicker): dateFilter for start and end dates independently.
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
### Feature Description
We have the `dateFilter` input, but this is limited to forcing you to use the same filter for the start range and end range. I'd like to see `startDateFilter` and `endDateFilter` inputs so that I can provide a filter for the start of the range and the end of the range independently. It doesn't have to be this exact solution, so as long as the use-case below can be met.
I think that the `endDateFilter` should also have an argument for the "start date" that the user selected so that you can programmatically define which end date(s) are acceptable for the start date the user selected if that is a necessary constraint.
### Use Case
Our use-case is to require the user to select a date that falls on any Monday then require the user to select any date after Monday so as long as it falls on a Sunday.
I don't see any way to require the user to do this without form validation rules (I'd like this to facilitated by the UI instead of through validation error messages).
The only thing that comes close, is the `SelectionStrategy` functionality, but it doesn't seem suitable for a variable number of weeks.
コントリビューションガイド
調査の方向性
まず MatDateRangePicker の dateFilter 入力と既存の SelectionStrategy 機能を確認してください。現在の API が開始日と終了日をどのように扱うかを確認し、選択した開始日を終了日のフィルタリングで利用できるようにしながら、月曜日を開始日、日曜日を終了日としてそれぞれ独立して選択するユースケースに対応できるかどうかを判断してください。完了条件は、フォーム検証のエラーメッセージに頼らず、UI が説明された制約を適用することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100