InlineDateTimePicker
Inline date and time picker with range support
Source
Package
DatePicker props
InlineDateTimePicker supports most of the DatePicker props.
Features that are not listed on this page are documented there.
Usage
InlineDateTimePicker renders a calendar with a time picker inline, without a dropdown.
The value is applied when the submit button is pressed.
Change the button label with the submitButtonLabel prop or the same DatesProvider setting, and pass other props with submitButtonProps:
| Mo | Tu | We | Th | Fr | Sa | Su |
|---|---|---|---|---|---|---|
With seconds
Set withSeconds prop to display seconds input in the time picker:
| Mo | Tu | We | Th | Fr | Sa | Su |
|---|---|---|---|---|---|---|
Range
Set type="range" to allow selecting a date and time range.
Two time inputs are rendered side by side with a range summary below them:
| Mo | Tu | We | Th | Fr | Sa | Su |
|---|---|---|---|---|---|---|
Controlled range
| Mo | Tu | We | Th | Fr | Sa | Su |
|---|---|---|---|---|---|---|
Controlling with useInlineDateTimePicker
InlineDateTimePicker component supports the controller pattern. Use the useInlineDateTimePicker hook to manage InlineDateTimePicker state.
The controller does not own the selected value, keep using value and onChange for it.
When the controller prop is set, the date, level and defaultTimeValue props of the component are ignored, pass them to useInlineDateTimePicker instead:
| Mo | Tu | We | Th | Fr | Sa | Su |
|---|---|---|---|---|---|---|
Time: not set
useInlineDateTimePicker returns the navigation actions of useCalendar together with time actions and queries:
The time inputs are driven through the controller, timePickerProps and endTimePickerProps do not accept a controller.
Value format
Use valueFormat prop to change the dayjs format of the range preview:
| Mo | Tu | We | Th | Fr | Sa | Su |
|---|---|---|---|---|---|---|