From 9b5ee9d551f09f606cb0e92f6288cf3edd76a1da Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Wed, 30 Oct 2024 12:33:50 +0100 Subject: [PATCH] fix(material/timepicker): value considered as invalid by default Fixes that the `_lastValueValid` was defaulting to false which meant that it would be considered as invalid on load. (cherry picked from commit cccc3dfae605c73bd00a660672f2cc564c346bd7) --- src/material/timepicker/timepicker-input.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/material/timepicker/timepicker-input.ts b/src/material/timepicker/timepicker-input.ts index 05433d3512ba..795c4cb1b72e 100644 --- a/src/material/timepicker/timepicker-input.ts +++ b/src/material/timepicker/timepicker-input.ts @@ -93,7 +93,7 @@ export class MatTimepickerInput implements ControlValueAccessor, Validator, O private _localeSubscription: Subscription; private _timepickerSubscription: OutputRefSubscription | undefined; private _validator: ValidatorFn; - private _lastValueValid = false; + private _lastValueValid = true; private _lastValidDate: D | null = null; /** Value of the `aria-activedescendant` attribute. */