fix(datetime): add correct null check when value changes (#25716)

resolves #25714
This commit is contained in:
Liam DeBeasi
2022-08-05 12:55:24 -04:00
committed by GitHub
parent 76ad1d18c8
commit 36bea1ca25

View File

@ -353,7 +353,7 @@ export class Datetime implements ComponentInterface {
this.activePartsClone = [...valueDateParts];
} else {
const { month, day, year, hour, minute } = valueDateParts;
const ampm = hour ? (hour >= 12 ? 'pm' : 'am') : undefined;
const ampm = hour != null ? (hour >= 12 ? 'pm' : 'am') : undefined;
this.activePartsClone = {
...this.activeParts,