reactjsmaterial-uimui-x-date-picker

Module not found: Can't resolve '@mui/lab/AdapterDateFns'


I was using the Material UI Timepicker but after updating to Material UI 5 it is not working anymore. I updated everything to @next and @material-ui/core (version 5.0.0-beta.5) and @material-ui/lab (version: 5.0.0-alpha.44).


Solution

  • If you copy the Timepicker code from the MUI docs, you also need to install the lab package which contains the adapter code to integrate with date-fns. See the requirements here. For reference, you can see the package.json file from the live demo.

    npm i @mui/lab