Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/material/timepicker/timepicker-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,11 @@ export class MatTimepickerInput<D> implements ControlValueAccessor, Validator, O
* @docs-private
*/
writeValue(value: any): void {
this.value.set(this._dateAdapter.getValidDateOrNull(value));
// Note that we need to deserialize here, rather than depend on the value change effect,
// because `getValidDateOrNull` will clobber the value if it's parseable, but not created by
// the current adapter (see #30140).
const deserialized = this._dateAdapter.deserialize(value);
this.value.set(this._dateAdapter.getValidDateOrNull(deserialized));
}

/**
Expand Down
Loading