feat(MatDateRangePicker): dateFilter for start and end dates independently.
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
### 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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia esaminando l’input dateFilter di MatDateRangePicker e la funzionalità SelectionStrategy esistente. Verifica come l’API attuale gestisce le date di inizio e fine, quindi determina se il caso d’uso può supportare la selezione indipendente del lunedì come data di inizio e della domenica come data di fine, rendendo disponibile la data di inizio selezionata per il filtraggio della data di fine. Il lavoro è completato quando l’UI applica i vincoli descritti senza fare affidamento sui messaggi di errore della convalida del modulo.
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
- 35/100