Et2Date: Fix incorrect validation error for empty dates on mobile

This commit is contained in:
nathan 2023-03-29 10:21:54 -06:00
parent 09560a325a
commit 7d71246ff0

View File

@ -660,9 +660,9 @@ export class Et2Date extends Et2InputWidget(FormControlMixin(LitFlatpickr))
{ {
return flatpickr.formatDate(<Date>this.defaultDate, this.getOptions().dateFormat); return flatpickr.formatDate(<Date>this.defaultDate, this.getOptions().dateFormat);
} }
if(typeof egwIsMobile == "function" && egwIsMobile()) if(typeof egwIsMobile == "function" && egwIsMobile() && this._inputNode?.value)
{ {
return this._inputNode?.value + "Z" || ""; return this._inputNode?.value + "Z";
} }
return this._inputNode?.value || ''; return this._inputNode?.value || '';
} }