angular / angular/components

feat(MatDateRangePicker): dateFilter for start and end dates independently.

Offen
#26,950 3 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
area: material/datepicker feature P3
Vorherrschende Sprache
TypeScript
Sterne
25k
Forks
6.8k
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
91

Beschreibung

### 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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der Überprüfung des dateFilter-Eingabefelds von MatDateRangePicker und der vorhandenen SelectionStrategy-Funktionalität. Prüfe, wie die aktuelle API Start- und Enddaten behandelt, und ermittle dann, ob der Anwendungsfall eine unabhängige Auswahl von Montag als Startdatum und Sonntag als Enddatum unterstützen kann, wobei das ausgewählte Startdatum für die Enddatumsfilterung verfügbar gemacht wird. Als abgeschlossen gilt die Aufgabe, wenn die UI die beschriebenen Einschränkungen durchsetzt, ohne sich auf Fehlermeldungen der Formularvalidierung zu stützen.

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
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.