Skip to content

Commit

Permalink
fix(datetime): add correct null check when value changes (#25716)
Browse files Browse the repository at this point in the history
resolves #25714
  • Loading branch information
liamdebeasi committed Aug 5, 2022
1 parent 76ad1d1 commit 36bea1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/components/datetime/datetime.tsx
Expand Up @@ -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,
Expand Down

0 comments on commit 36bea1c

Please sign in to comment.