PickersRangeCalendarHeader API
API reference docs for the React PickersRangeCalendarHeader component. Learn about the props, CSS, and other APIs of this exported module.
Demos
Import
import { PickersRangeCalendarHeader } from '@mui/x-date-pickers-pro/PickersRangeCalendarHeader';
// or
import { PickersRangeCalendarHeader } from '@mui/x-date-pickers-pro';Learn about the difference by reading this guide on minimizing bundle size.
Props of the native component are also available.
| Name | Type | Default | Description |
|---|---|---|---|
| calendars* | 1 | 2 | 3 | - | The number of calendars rendered. |
| currentMonth* | {} | - | |
| maxDate* | {} | - | |
| minDate* | {} | - | |
| month* | {} | - | Month used for this header. |
| monthIndex* | number | - | Index of the month used for this header. |
| onMonthChange* | func | - | Signature: function(date: any) => void |
| reduceAnimations* | bool | - | |
| timezone* | string | - | |
| view* | 'day' | 'month' | 'year' | - | |
| views* | Array<'day' | 'month' | 'year'> | - | |
| classes | Partial | - | Override or extend the styles applied to the component. See CSS classes API below for more details. |
| disabled | bool | - | |
| disableFuture | bool | - | |
| disablePast | bool | - | |
| format | string | `${adapter.formats.month} ${adapter.formats.year}` | Format used to display the date. |
| labelId | string | - | Id of the calendar text element.
It is used to establish an |
| onViewChange | func | - | Signature: function(view: DateView) => void |
| slotProps | PickersCalendarHeaderSlotProps | {} | The props used for each component slot. |
| slots | PickersCalendarHeaderSlots | {} | Overridable component slots. See Slots API below for more details. |
ref is forwarded to the root element.| Slot name | Class name | Default component | Description |
|---|---|---|---|
| leftArrowIcon | ArrowLeft | Icon displayed in the left view switch button. | |
| nextIconButton | IconButton | Button allowing to switch to the right view. | |
| previousIconButton | IconButton | Button allowing to switch to the left view. | |
| rightArrowIcon | ArrowRight | Icon displayed in the right view switch button. | |
| switchViewButton | IconButton | Button displayed to switch between different calendar views. | |
| switchViewIcon | ArrowDropDown | Icon displayed in the SwitchViewButton. Rotated by 180° when the open view is `year`. |
Source code
If you did not find the information in this page, consider having a look at the implementation of the component for more detail.