bug(mat-date-range-picker): MatEndDate dateChanged is triggered by changes to start and end date
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 91
Description
#### 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
Contributor guide
Research direction
Start with the linked StackBlitz reproduction and the Angular Material docs example for MatDateRangePicker, focusing on the dateChanged handlers on matStartDate and matEndDate. Reproduce the event sequence while changing each date; done means the matEndDate handler fires only for end-date changes, or the supported way to detect both dates being set is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100