Skip to content

Conversation

@crisbeto
Copy link
Member

@crisbeto crisbeto commented Dec 1, 2025

The datepicker ControlValueAccessor produces a new date object for each keystroke as the user is typing. When used with the interop behavior from signal forms, this can end up reverting the user's value as they're typing.

These changes ignore writeValue calls if they pass the exact same date object.

Fixes #32442.

@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Dec 1, 2025
@crisbeto crisbeto requested a review from a team as a code owner December 1, 2025 09:09
@crisbeto crisbeto requested review from mmalerba and wagnermaciel and removed request for a team December 1, 2025 09:09
@crisbeto crisbeto force-pushed the 32442/signal-forms-datepicker branch 2 times, most recently from 03f3fb7 to 895c2e4 Compare December 1, 2025 12:45
@crisbeto crisbeto changed the title fix(material/datepicker): excessive re-formatting with signal forms fix(material/datepicker): do not re-assign value while the user is typing Dec 1, 2025
The datepicker ControlValueAccessor produces a new date object for each keystroke as the user is typing. When used with the interop behavior from signal forms, this can end up reverting the user's value as they're typing.

These changes ignore `writeValue` calls if they pass the exact same date object.

Fixes angular#32442.
@crisbeto crisbeto force-pushed the 32442/signal-forms-datepicker branch from 895c2e4 to d91bead Compare December 2, 2025 08:33
@crisbeto crisbeto changed the title fix(material/datepicker): do not re-assign value while the user is typing fix(material/datepicker): do not re-assign the same forms value Dec 2, 2025
@crisbeto crisbeto removed the request for review from mmalerba December 2, 2025 17:26
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Dec 2, 2025
@crisbeto crisbeto merged commit 4cc5880 into angular:main Dec 2, 2025
23 of 25 checks passed
@crisbeto
Copy link
Member Author

crisbeto commented Dec 2, 2025

This PR was merged into the repository. The changes were merged into the following branches:

crisbeto added a commit that referenced this pull request Dec 2, 2025
The datepicker ControlValueAccessor produces a new date object for each keystroke as the user is typing. When used with the interop behavior from signal forms, this can end up reverting the user's value as they're typing.

These changes ignore `writeValue` calls if they pass the exact same date object.

Fixes #32442.

(cherry picked from commit 4cc5880)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: material/datepicker target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(Datepicker): with signal forms the input field automatically interprets incomplete data during input, thereby hindering/preventing input

2 participants