mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-24 06:22:45 +08:00
fix(datetime): allow values to be zero (#14480)
* fix(datetime): allow values to be zero * Using null check
This commit is contained in:
@ -11,7 +11,7 @@ export function renderDatetime(template: string, value: DatetimeData, locale: Lo
|
|||||||
const token = '{' + index + '}';
|
const token = '{' + index + '}';
|
||||||
const text = renderTextFormat(format.f, (value as any)[format.k], value, locale);
|
const text = renderTextFormat(format.f, (value as any)[format.k], value, locale);
|
||||||
|
|
||||||
if (!hasText && text && (value as any)[format.k]) {
|
if (!hasText && text && (value as any)[format.k] != null) {
|
||||||
hasText = true;
|
hasText = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user