[pickers] TypeError when providing a default value to the DatePicker field #8351
Closed
2 tasks done
Labels
component: pickers
This is the name of the generic UI component, not the React module!
status: expected behavior
Does not imply the behavior is intended. Just that we know about it and can't work around it
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/s/datepicker-error-cufgpy?file=/src/App.tsx
Steps:
Current behavior 😯
A TypeError is being thrown:
date.isBefore is not a function
Expected behavior 🤔
No error with the DateTimePicker field containing the default value.
Context 🔦
I'm developing an edit form for a resource. The form is supposed to edit an object and takes the current object as its default values. This was working with MUI date and time pickers v5. The error came about with v6.
Your environment 🌎
npx @mui/envinfo
Order ID or Support key 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: