From 14b41451acad543056407bd98bbbb7dbaac4e680 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Tue, 15 Nov 2022 11:27:12 +0100 Subject: [PATCH] fix: [genericTemplates:filters] Make sure to always return a string when fetching data --- templates/genericTemplates/filters.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/genericTemplates/filters.php b/templates/genericTemplates/filters.php index d900104..a193721 100644 --- a/templates/genericTemplates/filters.php +++ b/templates/genericTemplates/filters.php @@ -202,7 +202,7 @@ echo $this->Bootstrap->modal([ rowData['operator'] = $row.find('select.fieldOperator').val() const $formElement = $row.find('.fieldValue'); if ($formElement.attr('type') === 'datetime-local') { - rowData['value'] = moment($formElement.val()).toISOString() + rowData['value'] = $formElement.val().length > 0 ? moment($formElement.val()).toISOString() : $formElement.val() } else { rowData['value'] = $formElement.val() }