angular / angular/components

bug(material/datepicker): There is no way to deselect the selected date(s) while a calendar is open

Abierto
#29,877 1 comentario 2 reacciones 0 asignados Ver en GitHub
area: material/datepicker P2
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

I have a reset button in the date range picker, but when I try to reset the selected dates using the reset button, it resets the models but not the selection in the date range picker widget.

![Image](https://github.com/user-attachments/assets/597ce098-3598-4d91-87a5-712627d075b0)

### Reproduction

StackBlitz link: https://stackblitz.com/edit/4wfp1v-mbnz3s?file=src%2Fexample%2Fdate-range-picker-overview-example.html

Steps to reproduce:
1. Open the date range picker widget.
2. Select a date range.
3. Click the reset button.
4. Observe that while the underlying models are reset, the date selection in the date range picker widget remains unchanged.

### Expected Behavior

I was expecting the date range picker widget to completely clear the selected dates and reset to its default state when the reset button is clicked, along with resetting the underlying models.

### Actual Behavior

The actual behavior is that when the reset button is clicked, the underlying models are reset, but the selected dates in the date range picker widget remain highlighted and do not clear.

### Environment

- Angular: ^19.0.0-next.2
- CDK/Material: ^19.0.0-next.2
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows and Ubuntu

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la reproducción vinculada de StackBlitz, específicamente con src/example/date-range-picker-overview-example.html, y reproduce el flujo de restablecimiento en el date-range picker. Sigue el comportamiento del widget después de borrar los modelos e identifica las pruebas relevantes de Material date-range picker; se considera completado cuando el botón de restablecimiento borra tanto los modelos como la selección de fecha resaltada.

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
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
42/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.