just ensure we have a value when creating date range objects w/ burnettk

This commit is contained in:
jasquat 2023-07-14 12:04:07 -04:00
parent 4e6ba9eb9d
commit 78bffc8459
1 changed files with 1 additions and 2 deletions

View File

@ -86,8 +86,7 @@ export default function DateRangePickerWidget({
}
let dateValue: (Date | null)[] | null = value;
const dateRegex = new RegExp(DATE_RANGE_DELIMITER);
if (value && dateRegex.test(value)) {
if (value) {
const [startDateString, endDateString] = value.split(DATE_RANGE_DELIMITER);
let startDate = null;
let endDate = null;