Skip to content

DateTimeRangePickerTabs API

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

Component demos

Import

import { DateTimeRangePickerTabs } from '@mui/x-date-pickers-pro/DateTimeRangePicker';
// or
import { DateTimeRangePickerTabs } from '@mui/x-date-pickers-pro';
Learn about the difference by reading this guide on minimizing bundle size.

Props

onViewChangeRequired

Callback called when a tab is clicked.

Type:func

Signature:
function(view: TView) => void
  • view The view to open

viewRequired

Currently visible picker view.

Type:'day'
| 'hours'
| 'meridiem'
| 'minutes'
| 'month'
| 'seconds'
| 'year'


classes

Override or extend the styles applied to the component.

See CSS API below for more details.

Type:object


dateIcon

Date tab icon.

Type:element

Default:DateRangeIcon


hidden

Toggles visibility of the tabs allowing view switching.

Type:bool

Default:`window.innerHeight < 667` for `DesktopDateTimeRangePicker` and `MobileDateTimeRangePicker`


timeIcon

Time tab icon.

Type:element

Default:TimeIcon


The component cannot hold a ref.

CSS classes

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

.MuiDateTimeRangePickerTabs-filler

Styles applied to the filler element, shown instead of a navigation arrow.

Rule name:filler


.MuiDateTimeRangePickerTabs-navigationButton

Styles applied to the tab navigation button elements.

Rule name:navigationButton


.MuiDateTimeRangePickerTabs-root

Styles applied to the root element.

Rule name:root


.MuiDateTimeRangePickerTabs-tabButton

Styles applied to the tab button element.

Rule name:tabButton



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