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.

Demos

For examples and details on the usage of this React component, visit the component demo pages:

Import

import { DateRangePickerDay } from '@mui/x-date-pickers-pro/DateRangePickerDay';
// or
import { DateRangePickerDay } from '@mui/x-date-pickers-pro';
You can learn about the difference by reading this guide on minimizing bundle size.

Component name

The name MuiDateRangePickerDay can be used when providing default props or style overrides in the theme.

Props

NameTypeDefaultDescription
day*any
The date to show.
isEndOfHighlighting*boolfalse
Set to true if the day is the end of a highlighted date range.
isEndOfPreviewing*boolfalse
Set to true if the day is the start of a previewing date range.
isFirstVisibleCell*boolfalse
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.
isHighlighting*boolfalse
Set to true if the day is in a highlighted date range.
isLastVisibleCell*boolfalse
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.
isPreviewing*boolfalse
Set to true if the day is in a preview date range.
isStartOfHighlighting*boolfalse
Set to true if the day is the start of a highlighted date range.
isStartOfPreviewing*boolfalse
Set to true if the day is the end of a previewing date range.
outsideCurrentMonth*boolfalse
If true, day is outside of month and will be hidden.
actionfunc
| { current?: { focusVisible: func } }
A ref for imperative actions. It currently only supports focusVisible() action.
centerRippleboolfalse
If true, the ripples are centered. They won't start at the cursor interaction position.
classesobject
Override or extend the styles applied to the component. See CSS API below for more details.
disabledboolfalse
If true, renders as disabled.
disableHighlightTodayboolfalse
If true, today's date is rendering without highlighting with circle.
disableMarginboolfalse
If true, days are rendering without margin. Useful for displaying linked range of days.
disableRippleboolfalse
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.
disableTouchRippleboolfalse
If true, the touch ripple effect is disabled.
focusRippleboolfalse
If true, the base button will have a keyboard focus ripple.
focusVisibleClassNamestring
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.
isVisuallySelectedboolfalse
Indicates if the day should be visually selected.
onFocusVisiblefunc
Callback fired when the component is focused with a keyboard. We trigger a onFocus callback too.
selectedboolfalse
If true, renders as selected.
showDaysOutsideCurrentMonthboolfalse
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.
sxArray<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.
todayboolfalse
If true, renders as today date.
TouchRipplePropsobject
Props applied to the TouchRipple element.
touchRippleReffunc
| { current?: { pulsate: func, start: func, stop: func } }
A ref that points to the TouchRipple element.

The ref is forwarded to the root element.

CSS

Rule nameGlobal classDescription
root.MuiDateRangePickerDay-rootStyles applied to the root element.
rangeIntervalDayHighlight.MuiDateRangePickerDay-rangeIntervalDayHighlightStyles applied to the root element if isHighlighting=true.
rangeIntervalDayHighlightStart.MuiDateRangePickerDay-rangeIntervalDayHighlightStartStyles applied to the root element if isStartOfHighlighting=true.
rangeIntervalDayHighlightEnd.MuiDateRangePickerDay-rangeIntervalDayHighlightEndStyles applied to the root element if isEndOfHighlighting=true.
rangeIntervalPreview.MuiDateRangePickerDay-rangeIntervalPreviewStyles applied to the preview element.
rangeIntervalDayPreview.MuiDateRangePickerDay-rangeIntervalDayPreviewStyles applied to the root element if isPreviewing=true.
rangeIntervalDayPreviewStart.MuiDateRangePickerDay-rangeIntervalDayPreviewStartStyles applied to the root element if isStartOfPreviewing=true.
rangeIntervalDayPreviewEnd.MuiDateRangePickerDay-rangeIntervalDayPreviewEndStyles applied to the root element if isEndOfPreviewing=true.
outsideCurrentMonth.MuiDateRangePickerDay-outsideCurrentMonthStyles applied to the root element if `outsideCurrentMonth=true`
startOfMonth.MuiDateRangePickerDay-startOfMonthStyles applied to the root element if day is the start of the month.
endOfMonth.MuiDateRangePickerDay-endOfMonthStyles applied to the root element if day is the end of the month.
firstVisibleCell.MuiDateRangePickerDay-firstVisibleCellStyles applied to the root element if day is the first visible cell of the month.
lastVisibleCell.MuiDateRangePickerDay-lastVisibleCellStyles applied to the root element if day is the last visible cell of the month.
hiddenDayFiller.MuiDateRangePickerDay-hiddenDayFillerStyles applied to the root element if it is an empty cell used to fill the week.
day.MuiDateRangePickerDay-dayStyles applied to the day element.
dayOutsideRangeInterval.MuiDateRangePickerDay-dayOutsideRangeIntervalStyles applied to the day element if isHighlighting=false.
dayInsideRangeInterval.MuiDateRangePickerDay-dayInsideRangeIntervalStyles applied to the day element if selected=false and isHighlighting=true.
notSelectedDate.MuiDateRangePickerDay-notSelectedDateStyles applied to the day element if selected=false.

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