Skip to content

DateRangePickerDay API

API documentation for the React DateRangePickerDay component. Learn about the available props, and the CSS API.

Import

import DateRangePickerDay from '@material-ui/lab/DateRangePickerDay';
// or
import { DateRangePickerDay } from '@material-ui/lab';
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
classes*objectOverride or extend the styles applied to the component. See CSS API below for more details.
day*anyThe date to show.
isEndOfHighlighting*boolfalseSet to true if the day is the end of a highlighted date range.
isEndOfPreviewing*boolfalseSet to true if the day is the start of a highlighted date range.
isHighlighting*boolfalseSet to true if the day is in a highlighted date range.
isPreviewing*boolfalseSet to true if the day is in a preview date range.
isStartOfHighlighting*boolfalseSet to true if the day is the start of a highlighted date range.
isStartOfPreviewing*boolfalseSet to true if the day is the end of a highlighted date range.
outsideCurrentMonth*boolfalseIf true, day is outside of month and will be hidden.
childrennodeThe content of the component.
selectedboolfalseIf true, renders as selected.

The ref is forwarded to the root element.

CSS

Rule nameGlobal classDescription
root.MuiDateRangePickerDay-rootStyles applied to the root element.
dayWithMargin.MuiDateRangePickerDay-dayWithMarginStyles applied to the root element if disableMargin=false.
dayOutsideMonth.MuiDateRangePickerDay-dayOutsideMonthStyles applied to the root element if outsideCurrentMonth=true and showDaysOutsideCurrentMonth=true.
hiddenDaySpacingFiller.MuiDateRangePickerDay-hiddenDaySpacingFillerStyles applied to the root element if outsideCurrentMonth=true and showDaysOutsideCurrentMonth=false.
today.MuiDateRangePickerDay-todayStyles applied to the root element if disableHighlightToday=false and today=true.
selected.Mui-selectedPseudo-class applied to the root element if selected=true.
disabled.Mui-disabledPseudo-class applied to the root element if disabled=true.
day.MuiDateRangePickerDay-day
rangeIntervalDayHighlight.MuiDateRangePickerDay-rangeIntervalDayHighlight
rangeIntervalDayHighlightStart.MuiDateRangePickerDay-rangeIntervalDayHighlightStart
rangeIntervalDayHighlightEnd.MuiDateRangePickerDay-rangeIntervalDayHighlightEnd
dayOutsideRangeInterval.MuiDateRangePickerDay-dayOutsideRangeInterval
dayInsideRangeInterval.MuiDateRangePickerDay-dayInsideRangeInterval
notSelectedDate.MuiDateRangePickerDay-notSelectedDate
rangeIntervalPreview.MuiDateRangePickerDay-rangeIntervalPreview
rangeIntervalDayPreview.MuiDateRangePickerDay-rangeIntervalDayPreview
rangeIntervalDayPreviewStart.MuiDateRangePickerDay-rangeIntervalDayPreviewStart
rangeIntervalDayPreviewEnd.MuiDateRangePickerDay-rangeIntervalDayPreviewEnd

You can override the style of the component using one of these customization options: If that isn't sufficient, you can check the implementation of the component for more detail.

Demos