-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
The basic (non signal form) input, temporarily allows invalid values such as "21/1/2025" or "/1/2025". This typically occurs when the value is set to "1/1/2025", and the user tries to change the value to "2/1/2025" by either:
- Entering a "2" in front of "1/1/2025" and the deleting the "1", or
- Deleting the first "1" and then entering a "2"
This would be the correct and expected behavior.
With the new signal form input, it is very difficult to edit values since the datepicker deletes the field too aggressively.
- Enter a "2" in front of "1/1/2025" and the date will be deleted.
- Delete the first "1" and the date will be deleted.
Reproduction
StackBlitz link:
https://stackblitz.com/edit/stackblitz-starters-xjruwf9c?file=src%2Fmain.ts
Steps to reproduce:
Go to the second date input
- Enter a "2" in front of "1/1/2025" and the date will be deleted.
- Delete the first "1" and the date will be deleted.
The first date input is to simply to showcase the original / correct behavior.
Expected Behavior
The signal form input should behave like the basic form input.
Actual Behavior
The date is being deleted.
Environment
Angular CLI : 21.0.2
Angular : 21.0.3
Node.js : 20.19.1
Package Manager : npm 10.8.2
Operating System : linux x64
┌────────────────────────────────────┬───────────────────┬───────────────────┐
│ Package │ Installed Version │ Requested Version │
├────────────────────────────────────┼───────────────────┼───────────────────┤
│ @angular/animations │ 21.0.3 │ ^21.0.3 │
│ @angular/build │ 21.0.2 │ ^21.0.2 │
│ @angular/cdk │ 21.0.2 │ ^21.0.2 │
│ @angular/cli │ 21.0.2 │ ^21.0.2 │
│ @angular/common │ 21.0.3 │ ^21.0.3 │
│ @angular/compiler │ 21.0.3 │ ^21.0.3 │
│ @angular/compiler-cli │ 21.0.3 │ ^21.0.3 │
│ @angular/core │ 21.0.3 │ ^21.0.3 │
│ @angular/forms │ 21.0.3 │ ^21.0.3 │
│ @angular/language-service │ 21.0.3 │ ^21.0.3 │
│ @angular/material │ 21.0.2 │ ^21.0.2 │
│ @angular/material-date-fns-adapter │ 21.0.2 │ ^21.0.2 │
│ @angular/platform-browser │ 21.0.3 │ ^21.0.3 │
│ @angular/platform-browser-dynamic │ 21.0.3 │ ^21.0.3 │
│ @angular/router │ 21.0.3 │ ^21.0.3 │
│ rxjs │ 7.8.2 │ ^7.8.1 │
│ typescript │ 5.9.3 │ ^5.8.2 │
│ zone.js │ 0.15.0 │ ~0.15.0 │
└────────────────────────────────────┴───────────────────┴───────────────────┘