-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/timepicker
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 I register to the valueChanges of a form-group, then I get a valueChange during initialization, which is different from other components. I prepared a StackBlitz for this where I have datepicker and a timepicker. Only when the timepicker is present, the form emits a valueChanges-event.
Reproduction
StackBlitz link: https://stackblitz.com/edit/iar2r8q6?file=src%2Fexample%2Ftimepicker-overview-example.html,src%2Fexample%2Ftimepicker-overview-example.ts&startScript=start
Steps to reproduce:
- Open the developer console and watch for the logs
- In the beginning there is no component in the form.
- After 500ms the datepicker is added and no valueChanges-event is emitted.
- after another 500ms the timepicker is added, but here a valueChanges-event is emitted.
This behavior is not consistent in my opinion.
Expected Behavior
The timepicker should not send a valueChanges-event during initialization.
Actual Behavior
The timepicker sends a valueChanges-event during initialization.
Environment
- Angular: 21.0.0
- CDK/Material: 21.0.0
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): macOS, Windows
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/timepicker