Skip to content

Commit

Permalink
fix: set date input to null when there is no value
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordy Quak committed Feb 14, 2024
1 parent 900dcc8 commit 3368de6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/dateTimePickerInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@
datetimeFormat,
);

if (!parsedValue) return;

if (isValidDate(formatDefaultParse)) {
setSelectedDate(formatDefaultParse);
} else {
Expand All @@ -160,6 +158,8 @@

default:
}
} else {
setSelectedDate(null);
}
}, [parsedValue]);

Expand Down Expand Up @@ -216,6 +216,8 @@
}
};

console.log({ selectedDate });

Check warning on line 219 in src/components/dateTimePickerInput.js

View workflow job for this annotation

GitHub Actions / test

Unexpected console statement

const DateTimeCmp = (
<DateTimeComponent
error={errorState}
Expand Down

0 comments on commit 3368de6

Please sign in to comment.