mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 22:17:40 +08:00
fix(datetime): add additional checks for placeholders in angular (#17774)
This commit is contained in:
@ -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);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user