fix(datetime): add additional checks for placeholders in angular (#17774)

This commit is contained in:
Liam DeBeasi
2019-03-13 11:46:56 -04:00
committed by GitHub
parent 6939f7941f
commit f097276388

View File

@ -542,7 +542,11 @@ export class Datetime implements ComponentInterface {
// create the text of the formatted data // create the text of the formatted data
const template = this.displayFormat || this.pickerFormat || DEFAULT_FORMAT; const template = this.displayFormat || this.pickerFormat || DEFAULT_FORMAT;
if (this.value === undefined || this.value === null) { return; } if (
this.value === undefined ||
this.value === null ||
this.value.length === 0
) { return; }
return renderDatetime(template, this.datetimeValue, this.locale); return renderDatetime(template, this.datetimeValue, this.locale);
} }