You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(mat-datepicker): date parse errors are not propagated to Signal Forms #33952
The datepicker input provides a matDatepickerParse validation error when the user enters text that cannot be parsed as a date.
This error is available when using Reactive Forms, but when using Signal Forms, the error does not reach the errors signal of the field tree. The value of the form field stays as null.
Enter an invalid date string into the Reactive Forms datepicker.
Observe that the control reports a matDatepickerParse error.
Enter the same invalid date string into the Signal Forms datepicker.
Observe that the Signal Forms field does not report the corresponding parse error in field().errors().
Expected Behavior
I would expect the date parse errors to also be available to the Signal Form.
If I understand correctly, this seems to be in line with the direction of the Angular Signal Forms API, for example with https://angular.dev/api/forms/signals/transformedValue to report parse errors in custom controls.
Actual Behavior
The date parse errors are not available to the Signal Form. Since the form value remains as null for invalid values, distinguishing between an empty form and invalid input is not possible in the schema.
Environment
Angular: 22.2.2
CDK/Material: 22.2.2
Browser(s): Chrome, Firefox, Safari
Operating System (e.g. Windows, macOS, Ubuntu): macOS
Activity