From 3368de65f6ae30487d19008c04950be79e58cd8d Mon Sep 17 00:00:00 2001 From: Jordy Quak Date: Wed, 14 Feb 2024 11:58:08 +0100 Subject: [PATCH] fix: set date input to null when there is no value --- src/components/dateTimePickerInput.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/dateTimePickerInput.js b/src/components/dateTimePickerInput.js index dfe58be43..606238d0f 100644 --- a/src/components/dateTimePickerInput.js +++ b/src/components/dateTimePickerInput.js @@ -134,8 +134,6 @@ datetimeFormat, ); - if (!parsedValue) return; - if (isValidDate(formatDefaultParse)) { setSelectedDate(formatDefaultParse); } else { @@ -160,6 +158,8 @@ default: } + } else { + setSelectedDate(null); } }, [parsedValue]); @@ -216,6 +216,8 @@ } }; + console.log({ selectedDate }); + const DateTimeCmp = (