DateTimePickerTabs API
Demos
For examples and details on the usage of this React component, visit the component demo pages:
Import
import { DateTimePickerTabs } from '@mui/x-date-pickers-pro';
// or
import { DateTimePickerTabs } from '@mui/x-date-pickers';
Component name
The nameMuiDateTimePickerTabs
can be used when providing default props or style overrides in the theme.Props
Name | Type | Default | Description |
---|---|---|---|
onViewChange* | func | Callback called when a tab is clicked Signature: function(view: TView) => void view: The view to open | |
view* | 'day' | 'hours' | 'minutes' | 'month' | 'seconds' | 'year' | Currently visible picker view. | |
classes | object | Override or extend the styles applied to the component. See CSS API below for more details. | |
dateIcon | node | DateRange | Date tab icon. |
hidden | bool | `window.innerHeight < 667` for `DesktopDateTimePicker` and `MobileDateTimePicker`, `displayStaticWrapperAs === 'desktop'` for `StaticDateTimePicker` | Toggles visibility of the tabs allowing view switching. |
timeIcon | node | Time | Time tab icon. |
The component cannot hold a ref.
CSS
Rule name | Global class | Description |
---|---|---|
root | .MuiDateTimePickerTabs-root | Styles applied to the root element. |
You can override the style of the component using one of these customization options:
- With a global class name.
- With a rule name as part of the component's
styleOverrides
property in a custom theme.