Skip to content

DateRangePickerDay API

API reference docs for the React DateRangePickerDay component. Learn about the props, CSS, and other APIs of this exported module.

Component 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

dayRequired

The date to show.

Type:object


isEndOfHighlightingRequired

Set to true if the day is the end of a highlighted date range.

Type:bool


isEndOfPreviewingRequired

Set to true if the day is the end of a previewing date range.

Type:bool


isFirstVisibleCellRequired

If true, day is the first visible cell of the month. Either the first day of the month or the first day of the week depending on showDaysOutsideCurrentMonth.

Type:bool


isHighlightingRequired

Set to true if the day is in a highlighted date range.

Type:bool


isLastVisibleCellRequired

If true, day is the last visible cell of the month. Either the last day of the month or the last day of the week depending on showDaysOutsideCurrentMonth.

Type:bool


isPreviewingRequired

Set to true if the day is in a preview date range.

Type:bool


isStartOfHighlightingRequired

Set to true if the day is the start of a highlighted date range.

Type:bool


isStartOfPreviewingRequired

Set to true if the day is the start of a previewing date range.

Type:bool


outsideCurrentMonthRequired

If true, day is outside of month and will be hidden.

Type:bool


action

A ref for imperative actions. It currently only supports focusVisible() action.

Type:func
| { current?: { focusVisible: func } }


centerRipple

If true, the ripples are centered. They won't start at the cursor interaction position.

Type:bool

Default:false


classes

Override or extend the styles applied to the component.

See CSS API below for more details.

Type:object


disabled

If true, renders as disabled.

Type:bool

Default:false


disableHighlightToday

If true, today's date is rendering without highlighting with circle.

Type:bool

Default:false


disableMargin

If true, days are rendering without margin. Useful for displaying linked range of days.

Type:bool

Default:false


disableRipple

If true, the ripple effect is disabled.
⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure to highlight the element by applying separate styles with the .Mui-focusVisible class.

Type:bool

Default:false


disableTouchRipple

If true, the touch ripple effect is disabled.

Type:bool

Default:false


focusRipple

If true, the base button will have a keyboard focus ripple.

Type:bool

Default:false


focusVisibleClassName

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 focus-visible class to other components if needed.

Type:string


isVisuallySelected

Indicates if the day should be visually selected.

Type:bool


onFocusVisible

Callback fired when the component is focused with a keyboard. We trigger a onFocus callback too.

Type:func


selected

If true, renders as selected.

Type:bool

Default:false


showDaysOutsideCurrentMonth

If true, days outside the current month are rendered:
- if fixedWeekNumber is defined, renders days to have the weeks requested.
- if fixedWeekNumber is not defined, renders day to fill the first and last week of the current month.
- ignored if calendars equals more than 1 on range pickers.

Type:bool

Default:false


sx

The system prop that allows defining system overrides as well as additional CSS styles.

See the `sx` page for more details.

Type:Array<func
| object
| bool>
| func
| object


today

If true, renders as today date.

Type:bool

Default:false


TouchRippleProps

Props applied to the TouchRipple element.

Type:object


touchRippleRef

A ref that points to the TouchRipple element.

Type:func
| { current?: { pulsate: func, start: func, stop: func } }


The ref is forwarded to the root element.

CSS classes

These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.

.MuiDateRangePickerDay-day

Styles applied to the day element.

Rule name:day


.MuiDateRangePickerDay-dayInsideRangeInterval

Styles applied to the day element if selected=false and isHighlighting=true.

Rule name:dayInsideRangeInterval


.MuiDateRangePickerDay-dayOutsideRangeInterval

Styles applied to the day element if isHighlighting=false.

Rule name:dayOutsideRangeInterval


.MuiDateRangePickerDay-endOfMonth

Styles applied to the root element if day is the end of the month.

Rule name:endOfMonth


.MuiDateRangePickerDay-firstVisibleCell

Styles applied to the root element if day is the first visible cell of the month.

Rule name:firstVisibleCell


.MuiDateRangePickerDay-hiddenDayFiller

Styles applied to the root element if it is an empty cell used to fill the week.

Rule name:hiddenDayFiller


.MuiDateRangePickerDay-lastVisibleCell

Styles applied to the root element if day is the last visible cell of the month.

Rule name:lastVisibleCell


.MuiDateRangePickerDay-notSelectedDate

Styles applied to the day element if selected=false.

Rule name:notSelectedDate


.MuiDateRangePickerDay-outsideCurrentMonth

Styles applied to the root element if outsideCurrentMonth=true

Rule name:outsideCurrentMonth


.MuiDateRangePickerDay-rangeIntervalDayHighlight

Styles applied to the root element if isHighlighting=true.

Rule name:rangeIntervalDayHighlight


.MuiDateRangePickerDay-rangeIntervalDayHighlightEnd

Styles applied to the root element if isEndOfHighlighting=true.

Rule name:rangeIntervalDayHighlightEnd


.MuiDateRangePickerDay-rangeIntervalDayHighlightStart

Styles applied to the root element if isStartOfHighlighting=true.

Rule name:rangeIntervalDayHighlightStart


.MuiDateRangePickerDay-rangeIntervalDayPreview

Styles applied to the root element if isPreviewing=true.

Rule name:rangeIntervalDayPreview


.MuiDateRangePickerDay-rangeIntervalDayPreviewEnd

Styles applied to the root element if isEndOfPreviewing=true.

Rule name:rangeIntervalDayPreviewEnd


.MuiDateRangePickerDay-rangeIntervalDayPreviewStart

Styles applied to the root element if isStartOfPreviewing=true.

Rule name:rangeIntervalDayPreviewStart


.MuiDateRangePickerDay-rangeIntervalPreview

Styles applied to the preview element.

Rule name:rangeIntervalPreview


.MuiDateRangePickerDay-root

Styles applied to the root element.

Rule name:root


.MuiDateRangePickerDay-startOfMonth

Styles applied to the root element if day is the start of the month.

Rule name:startOfMonth



You can override the style of the component using one of these customization options: