MonthCalendar API
Demos
For examples and details on the usage of this React component, visit the component demo pages:
Import
import { MonthCalendar } from '@mui/x-date-pickers-pro/MonthCalendar';
// or
import { MonthCalendar } from '@mui/x-date-pickers/MonthCalendar';
// or
import { MonthCalendar } from '@mui/x-date-pickers-pro';
// or
import { MonthCalendar } from '@mui/x-date-pickers';
Component name
The nameMuiMonthCalendar
can be used when providing default props or style overrides in the theme.Props
Name | Type | Default | Description |
---|---|---|---|
classes | object | Override or extend the styles applied to the component. See CSS API below for more details. | |
className | string | className applied to the root element. | |
defaultValue | any | The default selected value. Used when the component is not controlled. | |
disabled | bool | false | If true picker is disabled |
disableFuture | bool | false | If true , disable values after the current date for date components, time for time components and both for date time components. |
disableHighlightToday | bool | false | If true , today's date is rendering without highlighting with circle. |
disablePast | bool | false | If true , disable values before the current date for date components, time for time components and both for date time components. |
maxDate | any | Maximal selectable date. | |
minDate | any | Minimal selectable date. | |
onChange | func | Callback fired when the value changes. Signature: function(value: TDate | null) => void value: The new value. | |
readOnly | bool | false | If true picker is readonly |
shouldDisableMonth | func | Disable specific month. Signature: function(month: TDate) => boolean month: The month to test. returns (boolean): If true , the month will be disabled. | |
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. | |
value | any | The selected value. Used when the component is controlled. |
The component cannot hold a ref.
CSS
Rule name | Global class | Description |
---|---|---|
root | .MuiMonthCalendar-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.