Date & Time Pickers
Many forms require date or time input from users, such as entering a date of birth. Thus this package would have been incomplete without these date and time input components.
The date and time pickers provided are derived from Mui X Pickers. Please follow the installation guide and review the base concepts to begin integrating these components. Each picker component comes wrapped with a LocalizationProvider.
To use date and time pickers, you need to provide a default dateAdapter
using the ConfigProvider component. This can be done at the root level of your application, especially if it includes multiple forms with date and time pickers. To view the list of available libraries, refer this page.
<ConfigProvider dateAdapter={AdapterDayjs}>
<form>
{/* form content */}
</form>
</ConfigProvider>
The recommended dateAdapter
library is dayjs, so ensure you have it installed along with the @mui/x-date-pickers package.
To know why, read here.
npm install @mui/x-date-pickers
npm install dayjs
yarn add @mui/x-date-pickers
yarn add dayjs
📄️ Date
Integrate RHFDatePicker with react-hook-form to create customizable date-picking inputs. Supports flexible props for enhanced form functionality. Explore examples and API details for seamless integration.
📄️ Time
Use RHFTimePicker with react-hook-form to create customizable time input fields. Explore examples and API details for enhanced functionality.
📄️ Date Time
Integrate RHFDateTimePicker with react-hook-form for customizable date and time inputs. Supports various date adapters and flexible props. Check examples and API details for seamless integration.