PickersDay API
API reference docs for the React PickersDay component. Learn about the props, CSS, and other APIs of this exported module.
Demos
Import
import { PickersDay } from '@mui/x-date-pickers/PickersDay';
// or
import { PickersDay } from '@mui/x-date-pickers';
// or
import { PickersDay } from '@mui/x-date-pickers-pro';
Learn about the difference by reading this guide on minimizing bundle size.
Props of the native component are also available.
Name | Type | Default | Description |
---|---|---|---|
day* | object | - | The date to show. |
isFirstVisibleCell* | bool | - | If |
isLastVisibleCell* | bool | - | If |
outsideCurrentMonth* | bool | - | If |
action | func | { current?: { focusVisible: func } } | - | A ref for imperative actions. It currently only supports |
centerRipple | bool | false | If |
classes | object | - | Override or extend the styles applied to the component. See CSS classes API below for more details. |
disabled | bool | false | If |
disableHighlightToday | bool | false | If |
disableMargin | bool | false | If |
disableRipple | bool | false | If |
disableTouchRipple | bool | false | If |
focusRipple | bool | false | If |
focusVisibleClassName | string | - | 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 |
onFocusVisible | func | - | Callback fired when the component is focused with a keyboard. We trigger a |
selected | bool | false | If |
showDaysOutsideCurrentMonth | bool | false | If |
sx | Array<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. |
today | bool | false | If |
TouchRippleProps | object | - | Props applied to the |
touchRippleRef | func | { current?: { pulsate: func, start: func, stop: func } } | - | A ref that points to the |
ref
is forwarded to the root element.Theme default props
You can use MuiPickersDay
to change the default props of this component with the theme.
These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.
Class name | Rule name | Description |
---|---|---|
.Mui-disabled | State class applied to the root element if disabled=true . | |
.Mui-selected | State class applied to the root element if selected=true . | |
.MuiPickersDay-dayOutsideMonth | dayOutsideMonth | Styles applied to the root element if outsideCurrentMonth=true and showDaysOutsideCurrentMonth=true . |
.MuiPickersDay-dayWithMargin | dayWithMargin | Styles applied to the root element if disableMargin=false . |
.MuiPickersDay-root | root | Styles applied to the root element. |
.MuiPickersDay-today | today | Styles applied to the root element if disableHighlightToday=false and today=true . |
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.