bug(MatDateRangeInput): validation fails to update if end date gets set to after start date
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
### 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
When manually entering the start date to a date after the end date, you get a validation error "Invalid start date" which is correct and expected. However, if you correct the end date to a date that is after the start date the validation doesn't seem to update and still shows "Invalid start date".
### Reproduction
~~https://stackblitz.com/run?file=src/app/date-range-picker-forms-example.ts~~
https://stackblitz.com/edit/angular-ivy-a3ezpw?file=src/app/app.component.html
Steps to reproduce:
1. Set start date to 12/1/2021 and end date to 12/2/2021
2. Set start date to 12/3/2021
3. Set end date to 12/4/2021
### Expected Behavior
As soon as the end date is set to after the start date, validation should update and hide the error.
### Actual Behavior
"invalid start date" error is still shown.
### Environment
- Angular: ^12.2.9
- CDK/Material: ^12.2.9
- TypeScript: ^3.7.5
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): macOS
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la reproduction StackBlitz liée et examinez la validation de MatDateRangeInput en suivant les étapes indiquées. Confirmez que la correction de la date de fin efface l’erreur existante "Invalid start date", puis vérifiez le comportement dans la reproduction.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100