Skip to content

Commit 36bea1c

Browse files
authored
fix(datetime): add correct null check when value changes (#25716)
resolves #25714
1 parent 76ad1d1 commit 36bea1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/components/datetime/datetime.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ export class Datetime implements ComponentInterface {
353353
this.activePartsClone = [...valueDateParts];
354354
} else {
355355
const { month, day, year, hour, minute } = valueDateParts;
356-
const ampm = hour ? (hour >= 12 ? 'pm' : 'am') : undefined;
356+
const ampm = hour != null ? (hour >= 12 ? 'pm' : 'am') : undefined;
357357

358358
this.activePartsClone = {
359359
...this.activeParts,

0 commit comments

Comments
 (0)