When setting an initial date value for the MUI DatePicker, I encountered the following error:
value.isUTC is not a function
./node_modules/@mui/x-date-pickers/AdapterMoment/AdapterMoment.js/AdapterMoment/this.getTimezone@
The date being passed is:
2024-03-12
This is how the date is being parsed:
const startDateIntervalFrom = startStringIntervalFrom ? moment(startStringIntervalFrom, searchFilterDateFormat).utc().toDate() : null;
I have confirmed that the date is being parsed correctly by logging it to the console, so the date picker should be receiving the correct value
Here's my date picker component:
<DatePicker
label="From"
value={start}
onChange={handleStartDateChange}
/>