From 7d71246ff0f615f5e2b1737bff3a613aa1b2c13d Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 29 Mar 2023 10:21:54 -0600 Subject: [PATCH] Et2Date: Fix incorrect validation error for empty dates on mobile --- api/js/etemplate/Et2Date/Et2Date.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Date/Et2Date.ts b/api/js/etemplate/Et2Date/Et2Date.ts index ca69728fdd..fa555a6ab1 100644 --- a/api/js/etemplate/Et2Date/Et2Date.ts +++ b/api/js/etemplate/Et2Date/Et2Date.ts @@ -660,9 +660,9 @@ export class Et2Date extends Et2InputWidget(FormControlMixin(LitFlatpickr)) { return flatpickr.formatDate(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 || ''; }