angular / angular/components

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

Abierto
#26,950 3 comentarios 1 reacción 0 asignados Ver en GitHub
area: material/datepicker feature P3
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza revisando la entrada dateFilter de MatDateRangePicker y la funcionalidad existente de SelectionStrategy. Comprueba cómo gestiona la API actual las fechas de inicio y fin y, a continuación, determina si el caso de uso puede admitir la selección independiente del lunes como fecha de inicio y del domingo como fecha de fin, haciendo que la fecha de inicio seleccionada esté disponible para el filtrado de la fecha de fin. Se considera terminado cuando la UI aplica las restricciones descritas sin depender de los mensajes de error de validación del formulario.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, typescript
Área
frontend
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.