diff --git a/core/src/components/cat-time/cat-time.tsx b/core/src/components/cat-time/cat-time.tsx index ac4150e2..6716dc4b 100644 --- a/core/src/components/cat-time/cat-time.tsx +++ b/core/src/components/cat-time/cat-time.tsx @@ -182,7 +182,7 @@ export class CatTime { this.valueChangedBySelection = false; } else if (value !== oldValue) { this.set12hFormat(); - this.syncValue(value); + this.syncValue(value ?? ''); } } @@ -243,7 +243,7 @@ export class CatTime { let newValue = this.value; if (!date) { this.selectionTime = null; - this.value = undefined; + newValue = undefined; } else { const time = clampTime(this.min ?? null, date, this.max ?? null); this.isAm = this.format(time).toLowerCase().includes('am');