From 3368de65f6ae30487d19008c04950be79e58cd8d Mon Sep 17 00:00:00 2001 From: Jordy Quak Date: Wed, 14 Feb 2024 11:58:08 +0100 Subject: [PATCH 1/3] 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 = ( Date: Wed, 14 Feb 2024 12:00:06 +0100 Subject: [PATCH 2/3] chore: remove log --- src/components/dateTimePickerInput.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/dateTimePickerInput.js b/src/components/dateTimePickerInput.js index 606238d0f..96278d6ec 100644 --- a/src/components/dateTimePickerInput.js +++ b/src/components/dateTimePickerInput.js @@ -216,8 +216,6 @@ } }; - console.log({ selectedDate }); - const DateTimeCmp = ( Date: Wed, 14 Feb 2024 12:43:02 +0000 Subject: [PATCH 3/3] chore(release): 2.181.1 [skip ci] ## [2.181.1](https://github.com/bettyblocks/material-ui-component-set/compare/v2.181.0...v2.181.1) (2024-02-14) ### Bug Fixes * set date input to null when there is no value ([3368de6](https://github.com/bettyblocks/material-ui-component-set/commit/3368de65f6ae30487d19008c04950be79e58cd8d)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52cd9207c..fde126233 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [2.181.1](https://github.com/bettyblocks/material-ui-component-set/compare/v2.181.0...v2.181.1) (2024-02-14) + + +### Bug Fixes + +* set date input to null when there is no value ([3368de6](https://github.com/bettyblocks/material-ui-component-set/commit/3368de65f6ae30487d19008c04950be79e58cd8d)) + # [2.181.0](https://github.com/bettyblocks/material-ui-component-set/compare/v2.180.1...v2.181.0) (2024-02-09) diff --git a/package.json b/package.json index 8166778a4..65ea036fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "component-set", - "version": "2.181.0", + "version": "2.181.1", "main": "dist/templates.json", "license": "UNLICENSED", "private": false,