Optional
autoOptional
calendarsThe number of calendars to render on desktop.
Optional
classClass name applied to the root element.
Optional
closeIf true
, the popover or modal will close after submitting the full date.
Optional
componentsOverridable components.
Optional
componentsThe props used for each component slot.
Optional
currentPosition the current month is rendered in.
Optional
customTranslation object used for screen reader texts.
Optional
dayFormats the day of week displayed in the calendar header.
The day of week provided by the adapter. Deprecated, will be removed in v7: Use date
instead.
The date of the day of week provided by the adapter.
The name to display.
Optional
defaultDefault calendar month displayed when value={[null, null]}
.
Optional
defaultThe initial position in the edited date range. Used when the component is not controlled.
Optional
defaultThe default value. Used when the component is not controlled.
Optional
desktopCSS media query when Mobile
mode will be changed to Desktop
.
Optional
disableIf true
, after selecting start
date calendar will not automatically switch to the month of end
date.
Optional
disabledIf true
, the picker and text field are disabled.
Optional
disableIf true
, editing dates by dragging is disabled.
Optional
disableIf true
, disable values after the current date for date components, time for time components and both for date time components.
Optional
disableIf true
, today's date is rendering without highlighting with circle.
Optional
disableIf true
, the open picker button will not be rendered (renders only the field).
Optional
disableIf true
, disable values before the current date for date components, time for time components and both for date time components.
Optional
displayIf true
, the week number will be display in the calendar.
Optional
fixedCalendar will show more weeks in order to match this value. Put it to 6 for having fix number of week in Gregorian calendars
Optional
formatFormat of the date when rendered in the input(s).
Defaults to localized format based on the used views
.
Optional
formatDensity of the format when rendered in the input.
Setting formatDensity
to "spacious"
will add a space before and after each /
, -
and .
character.
Optional
inputPass a ref to the input
element.
Ignored if the field has several inputs.
Optional
labelThe label content. Ignored if the field has several inputs.
Optional
loadingIf true
, calls renderLoading
instead of rendering the day calendar.
Can be used to preload information and show it in calendar.
Optional
localeLocale for components texts.
Allows overriding texts coming from LocalizationProvider
and theme
.
Optional
maxMaximal selectable date.
Optional
minMinimal selectable date.
Optional
nameName attribute used by the input
element in the Field.
Ignored if the field has several inputs.
Optional
onCallback fired when the value is accepted.
The value that was just accepted.
Optional
onCallback fired when the value changes.
The new value.
The context containing the validation result of the current value.
Optional
onCallback fired when the popup requests to be closed.
Use in controlled mode (see open
).
Optional
onCallback fired when the error associated to the current value changes.
If the error has a non-null value, then the TextField
will be rendered in error
state.
The new error describing why the current value is not valid.
The value associated to the error.
Optional
onCallback fired on month change.
The new month.
Optional
onCallback fired when the popup requests to be opened.
Use in controlled mode (see open
).
Optional
onCallback fired when the range position changes.
The new range position.
Optional
onCallback fired when the selected sections change.
The new selected sections.
Optional
openControl the popup or dialog open state.
Optional
rangeThe position in the currently edited date range. Used when the component position is controlled.
Optional
readOptional
reduceIf true
, disable heavy animations.
Optional
referenceThe date used to generate the new value when both value
and defaultValue
are empty.
Optional
renderComponent displaying when passed loading
true.
The node to render when loading.
Optional
selectedThe currently selected sections. This prop accept four formats:
startIndex
and endIndex
properties are provided, the sections between those two indexes will be selected.FieldSectionType
is provided, the first section with that name will be selected.null
is provided, no section will be selected
If not provided, the selected sections will be handled internally.Optional
shouldDisable specific date.
Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
The date to test.
The date to test, 'start' or 'end'.
Returns true
if the date should be disabled.
Optional
showIf true
, days outside the current month are rendered:
if fixedWeekNumber
is defined, renders days to have the weeks requested.
if fixedWeekNumber
is not defined, renders day to fill the first and last week of the current month.
ignored if calendars
equals more than 1
on range pickers.
Optional
slotThe props used for each component slot.
Optional
slotsOverridable component slots.
Optional
sxThe system prop that allows defining system overrides as well as additional CSS styles.
Optional
timezoneChoose which timezone to use for the value. Example: "default", "system", "UTC", "America/New_York". If you pass values from other timezones to some props, they will be converted to this timezone before being used.
See the timezones documention for more details.
Optional
valueThe selected value. Used when the component is controlled.
Optional
viewDefine custom view renderers for each section.
If null
, the section will only have field editing.
If undefined
, internally defined view will be the used.
If
true
, the main element is focused during the first mount. This main element is:day
view).input
element if there is a field rendered.