@piplup/rhf-adaptersmui-x-date-pickers
Installation — @piplup/rhf-adapters (@mui/x-date-pickers)
Material UI adapters and element wrappers for connecting MUI X Date Picker components to React Hook Form.
@piplup/rhf-adapters/mui-x-date-pickers provides pre-integrated MUI X Date Picker components and adapter hooks for React Hook Form.
First, install the core packages, if not installed already:
npm install @piplup/rhf-core react-hook-formThen install the adapters package together with the MUI Material and MUI X Date Pickers peer dependencies:
npm install @piplup/rhf-adapters @mui/material @emotion/react @emotion/styled @mui/x-date-pickersAdditionally, install the date library of your choice for MUI X Date Pickers
npm install dayjsnpm install date-fnsnpm install luxonnpm install momentImport
import {
MuiXDatePickerElement,
useMuiXDatePickerAdapter,
} from "@piplup/rhf-adapters/mui-x-date-pickers";Use /mui-x-date-pickers subpath when you want MUI X Date Pickers components to participate in form state, validation, helper text composition, and react-hook-form controlled value handling without writing the wiring yourself.