feat(MatDateRangePicker): Add selection event
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
### 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.

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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia confrontando gli output esistenti monthSelected e yearSelected con il comportamento di dateChange di MatDatepickerInput, quindi esamina MatDateRangePicker e DefaultMatCalendarRangeStrategy. Il lavoro è completato quando i consumer possono osservare una selezione dell'intervallo non applicata tramite un output rangeSelected documentato e il comportamento è coperto dai test rilevanti del componente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- frontend
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100