Is this a regression?
The previous version in which this bug was not present was
9.2.0
Description
Adding a matDatepickerFilter onto a datepicker in 12.2.13 has the filter execute immediately along with a null value. I have not done a deep dive to see which version introduced this, we went from 9.x to 12.x and only noticed it when our testers raised a different issue.
Reproduction
- Create a mat datepicker component
- Wire up a simple matDatepickerFilter with a console.log
12.2.13 with the extra log:
https://stackblitz.com/edit/angular-11-material-reactive-starter-mfw6fz?file=src%2Fapp%2Fapp.component.ts
9.2.0 without the extra log:
https://stackblitz.com/edit/angular-9-expression-changed-issue-8rykpo?file=src%2Fapp%2Fapp.component.ts
Expected Behavior
It shouldn't be firing since the datepicker has not been opened.
Actual Behavior
It fires, and with a value of null.
Environment
- Angular: 12.2.14
- CDK/Material: 12.2.13
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10