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.

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 highlighted date range.
isHighlighting*boolfalse
Set to true if the day is in a highlighted date range.
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 highlighted date range.
outsideCurrentMonth*boolfalse
If true, day is outside of month and will be hidden.
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.
selectedboolfalse
If true, renders as selected.
showDaysOutsideCurrentMonthboolfalse
If true, days that have outsideCurrentMonth={true} are displayed.
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.

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 and outsideCurrentMonth=false.
rangeIntervalDayHighlightStart.MuiDateRangePickerDay-rangeIntervalDayHighlightStartStyles applied to the root element if isStartOfHighlighting=true or day is the start of the month.
rangeIntervalDayHighlightEnd.MuiDateRangePickerDay-rangeIntervalDayHighlightEndStyles applied to the root element if isEndOfHighlighting=true or day is the end of the month.
rangeIntervalPreview.MuiDateRangePickerDay-rangeIntervalPreviewStyles applied to the preview element.
rangeIntervalDayPreview.MuiDateRangePickerDay-rangeIntervalDayPreviewStyles applied to the root element if isPreviewing=true and outsideCurrentMonth=false.
rangeIntervalDayPreviewStart.MuiDateRangePickerDay-rangeIntervalDayPreviewStartStyles applied to the root element if isStartOfPreviewing=true or day is the start of the month.
rangeIntervalDayPreviewEnd.MuiDateRangePickerDay-rangeIntervalDayPreviewEndStyles applied to the root element if isEndOfPreviewing=true or day is the end of the month.
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:

Demos