@@ -94,7 +94,7 @@ export abstract class MatDatepickerInputBase<S, D = ExtractDateTypeFromSelection
9494 return this . _model ? this . _getValueFromModel ( this . _model . selection ) : this . _pendingValue ;
9595 }
9696 set value ( value : any ) {
97- this . _assignValueProgrammatically ( value ) ;
97+ this . _assignValueProgrammatically ( value , true ) ;
9898 }
9999 protected _model : MatDateSelectionModel < S , D > | undefined ;
100100
@@ -259,7 +259,7 @@ export abstract class MatDatepickerInputBase<S, D = ExtractDateTypeFromSelection
259259
260260 // Update the displayed date when the locale changes.
261261 this . _localeSubscription = this . _dateAdapter . localeChanges . subscribe ( ( ) => {
262- this . _assignValueProgrammatically ( this . value ) ;
262+ this . _assignValueProgrammatically ( this . value , true ) ;
263263 } ) ;
264264 }
265265
@@ -293,10 +293,8 @@ export abstract class MatDatepickerInputBase<S, D = ExtractDateTypeFromSelection
293293 writeValue ( value : D ) : void {
294294 // We produce a different date object on each keystroke which can cause signal forms'
295295 // interop logic to keep calling `writeValue` with the same value as the user is typing.
296- // Skip such cases since they can prevent the user from typing (see #32442).
297- if ( ! value || value !== this . value ) {
298- this . _assignValueProgrammatically ( value ) ;
299- }
296+ // Skip such cases since they can prevent the user from typing (see #32442 and #32475).
297+ this . _assignValueProgrammatically ( value , value !== this . value ) ;
300298 }
301299
302300 /** Implemented as part of ControlValueAccessor. */
@@ -403,12 +401,15 @@ export abstract class MatDatepickerInputBase<S, D = ExtractDateTypeFromSelection
403401 }
404402
405403 /** Programmatically assigns a value to the input. */
406- protected _assignValueProgrammatically ( value : D | null ) {
404+ protected _assignValueProgrammatically ( value : D | null , reformat : boolean ) {
407405 value = this . _dateAdapter . deserialize ( value ) ;
408406 this . _lastValueValid = this . _isValidValue ( value ) ;
409407 value = this . _dateAdapter . getValidDateOrNull ( value ) ;
410408 this . _assignValue ( value ) ;
411- this . _formatValue ( value ) ;
409+
410+ if ( reformat ) {
411+ this . _formatValue ( value ) ;
412+ }
412413 }
413414
414415 /** Gets whether a value matches the current date filter. */
0 commit comments