angular / angular/components

bug(mat-date-range-picker): MatEndDate dateChanged is triggered by changes to start and end date

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

Descripción

#### Reproduction

Stackblitz demo:

https://components-issue-aypuzh.stackblitz.io

Steps to reproduce:
1. Create a MatDateRangePicker as shown in the docs
2. Add the dateChanged attribute to matStartDate or matEndDate
3. Start to change dates

#### Expected Behavior

What behavior were you expecting to see?

That the date changed attribute on matEndDate is only triggered when you change the end date. Or a way to detect when both start and end date have successfully been set.

#### Actual Behavior

What behavior did you actually see?

The date changed attribute on matEndDate is triggered both when you change the start and end date.
#### Environment

- Angular: 10.0.0
- CDK/Material: Material 10.0.0
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): macOS

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la reproducción vinculada de StackBlitz y el ejemplo de la documentación de Angular Material para MatDateRangePicker, centrándote en los controladores dateChanged de matStartDate y matEndDate. Reproduce la secuencia de eventos mientras cambias cada fecha; se considera terminado cuando el controlador de matEndDate se dispara solo para los cambios de la fecha de finalización, o cuando se documenta la forma compatible de detectar que ambas fechas se han establecido.

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

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.