fix(datetime): account for 0 value when setting up picker columns (#17869)

This commit is contained in:
pwespi
2019-03-25 13:49:29 +01:00
committed by Liam DeBeasi
parent 0cb7db0599
commit 34f6f1d736
2 changed files with 6 additions and 1 deletions

View File

@ -6,7 +6,7 @@
export function getDateValue(date: DatetimeData, format: string): number {
const getValue = getValueFromFormat(date, format);
if (getValue) { return getValue; }
if (getValue !== undefined) { return getValue; }
const defaultDate = parseDate(new Date().toISOString());
return getValueFromFormat((defaultDate as DatetimeData), format);