DateRangePickerDay API
API reference docs for the React DateRangePickerDay component. Learn about the props, CSS, and other APIs of this exported module.
Demos
Import
import { DateRangePickerDay } from '@mui/x-date-pickers-pro/DateRangePickerDay';
// or
import { DateRangePickerDay } 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 |
---|---|---|---|
day* | object | - | The date to show. |
isEndOfHighlighting* | bool | - | Set to |
isEndOfPreviewing* | bool | - | Set to |
isFirstVisibleCell* | bool | - | If |
isHighlighting* | bool | - | Set to |
isLastVisibleCell* | bool | - | If |
isPreviewing* | bool | - | Set to |
isStartOfHighlighting* | bool | - | Set to |
isStartOfPreviewing* | bool | - | Set to |
outsideCurrentMonth* | bool | - | If |
action | func | { current?: { focusVisible: func } } | - | A ref for imperative actions. It currently only supports |
centerRipple | bool | false | If |
classes | object | - | Override or extend the styles applied to the component. See CSS classes API below for more details. |
disabled | bool | false | If |
disableHighlightToday | bool | false | If |
disableMargin | bool | false | If |
disableRipple | bool | false | If |
disableTouchRipple | bool | false | If |
draggable | bool | false | If |
focusRipple | bool | false | If |
focusVisibleClassName | string | - | This prop can help identify which element has keyboard focus. The class name will be applied when the element gains the focus through keyboard interaction. It's a polyfill for the CSS :focus-visible selector. The rationale for using this feature is explained here. A polyfill can be used to apply a |
isVisuallySelected | bool | - | Indicates if the day should be visually selected. |
onFocusVisible | func | - | Callback fired when the component is focused with a keyboard. We trigger a |
selected | bool | false | If |
showDaysOutsideCurrentMonth | bool | false | If |
sx | Array<func | object | bool> | func | object | - | The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details. |
today | bool | false | If |
TouchRippleProps | object | - | Props applied to the |
touchRippleRef | func | { current?: { pulsate: func, start: func, stop: func } } | - | A ref that points to the |
ref
is forwarded to the root element.These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.
Class name | Rule name | Description |
---|---|---|
.MuiDateRangePickerDay-day | day | Styles applied to the day element. |
.MuiDateRangePickerDay-dayInsideRangeInterval | dayInsideRangeInterval | Styles applied to the day element if selected=false and isHighlighting=true . |
.MuiDateRangePickerDay-dayOutsideRangeInterval | dayOutsideRangeInterval | Styles applied to the day element if isHighlighting=false . |
.MuiDateRangePickerDay-endOfMonth | endOfMonth | Styles applied to the root element if day is the end of the month. |
.MuiDateRangePickerDay-firstVisibleCell | firstVisibleCell | Styles applied to the root element if day is the first visible cell of the month. |
.MuiDateRangePickerDay-lastVisibleCell | lastVisibleCell | Styles applied to the root element if day is the last visible cell of the month. |
.MuiDateRangePickerDay-notSelectedDate | notSelectedDate | Styles applied to the day element if selected=false . |
.MuiDateRangePickerDay-outsideCurrentMonth | outsideCurrentMonth | Styles applied to the root element if outsideCurrentMonth=true |
.MuiDateRangePickerDay-rangeIntervalDayHighlight | rangeIntervalDayHighlight | Styles applied to the root element if isHighlighting=true . |
.MuiDateRangePickerDay-rangeIntervalDayHighlightEnd | rangeIntervalDayHighlightEnd | Styles applied to the root element if isEndOfHighlighting=true . |
.MuiDateRangePickerDay-rangeIntervalDayHighlightStart | rangeIntervalDayHighlightStart | Styles applied to the root element if isStartOfHighlighting=true . |
.MuiDateRangePickerDay-rangeIntervalDayPreview | rangeIntervalDayPreview | Styles applied to the root element if isPreviewing=true . |
.MuiDateRangePickerDay-rangeIntervalDayPreviewEnd | rangeIntervalDayPreviewEnd | Styles applied to the root element if isEndOfPreviewing=true . |
.MuiDateRangePickerDay-rangeIntervalDayPreviewStart | rangeIntervalDayPreviewStart | Styles applied to the root element if isStartOfPreviewing=true . |
.MuiDateRangePickerDay-rangeIntervalPreview | rangeIntervalPreview | Styles applied to the preview element. |
.MuiDateRangePickerDay-root | root | Styles applied to the root element. |
.MuiDateRangePickerDay-startOfMonth | startOfMonth | Styles applied to the root element if day is the start of the month. |
You can override the style of the component using one of these customization options:
- With a global class name.
- With a rule name as part of the component's
styleOverrides
property in a custom theme.
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.