feat(MatDateRangePicker): Add selection event
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### 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.
Beitragsleitfaden
Rechercherichtung
Beginne damit, die vorhandenen Ausgaben von monthSelected und yearSelected mit dem Verhalten von MatDatepickerInput bei dateChange zu vergleichen, und untersuche anschließend MatDateRangePicker und DefaultMatCalendarRangeStrategy. Die Arbeit ist abgeschlossen, wenn Konsumenten eine nicht angewendete Bereichsauswahl über eine dokumentierte Ausgabe rangeSelected beobachten können und das Verhalten durch die relevanten Komponententests abgedeckt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100