onChange | (date: DateIOType) => void | | onChange callback. |
value | ParsableDate | | Picker value. |
allowKeyboardControl | boolean | true | Enables keyboard listener for moving between days in calendar. |
animateYearScrolling | boolean | false | To animate scrolling to current year (using scrollIntoView). |
autoOk | boolean | false | Auto accept date on selection. |
disableFuture | boolean | false | Disable future dates. |
disableFocusRipple | bool | false | If true, the keyboard focus ripple will be disabled. |
disablePast | boolean | false | Disable past dates. |
disableToolbar | boolean | false | Hide toolbar and show only date/time views. |
emptyLabel | string | | Message displaying in text field, if null passed (doesn't work in keyboard mode). |
fullWidth | bool | false | If true, the button will take up the full width of its container. |
format | string | | Format string |
initialFocusedDate | ParsableDate | | Date that will be initially highlighted if null was passed |
inputVariant | 'standard'
| 'outlined'
| 'filled' | ' | Pass material-ui text field variant down, bypass internal variant prop. |
invalidDateMessage | ReactNode | Invalid Date Format | Message, appearing when date cannot be parsed |
invalidLabel | string | 'unknown' | Message displaying in text field if date is invalid (doesn't work in keyboard mode). |
labelFunc | (date: DateIOType, invalidLabel: string) => string | | Dynamic formatter of text field value. |
leftArrowButtonProps | Partial<IconButtonProps> | | Props to pass to left arrow button. |
leftArrowIcon | ReactNode | | Left arrow icon. |
loadingIndicator | Element | | Custom loading indicator. |
locale | string | object | 'en-US' | Locale for the date library you are using |
maxDate | ParsableDate | Date(2100-01-01) | Max selectable date. |
maxDateMessage | ReactNode | 'Date should not be after maximal date' | Error message, shown if date is more then maximal date. |
minDate | ParsableDate | 'Date(1900-01-01)' | Min selectable date. |
minDateMessage | ReactNode | 'Date should not be before minimal date' | Error message, shown if date is less then minimal date. |
onAccept | (date: DateIOType) => void | | Callback fired when date is accepted. |
onClose | () => void | | On close callback. |
onError | (error: ReactNode, value: DateIOType) => void | | Callback fired when new error should be displayed (!! This is a side effect. Be careful if you want to rerender the component). |
onMonthChange | (date: DateIOType) => void | Promise<void> | | Callback firing on month change. Return promise to render spinner till it will not be resolved. |
onOpen | () => void | | On open callback. |
onYearChange | (date: DateIOType) => void | | Callback firing on year change. |
open | boolean | | Controlled picker open state. |
openTo | 'date'
| 'year'
| 'month' | | The default visible view. Used when the component view is not controlled. Must be a valid option from `views`. This prop will only work if the `views` prop is also provided, as `openTo` needs to correspond to one of the available views defined in `views`. |
orientation | 'portrait'
| 'landscape' | portrait | Force rendering in particular orientation. |
PopoverProps | Partial<PopoverProps> | | Popover props passed to material-ui Popover (with variant='inline'). |
readOnly | boolean | | Make picker read only. |
renderDay | (day: DateIOType, selectedDate: DateIOType, dayInCurrentMonth: boolean, dayComponent: Element) => Element | | Custom renderer for day. |
rightArrowButtonProps | Partial<IconButtonProps> | | Props to pass to right arrow button. |
rightArrowIcon | ReactNode | | Right arrow icon. |
shouldDisableDate | (day: DateIOType) => boolean | | Disable specific date. |
strictCompareDates | boolean | false | Compare dates by the exact timestamp, instead of start/end of date. |
TextFieldComponent | ComponentClass<TextFieldProps, any> | FunctionComponent<TextFieldProps> | | Override input component. |
ToolbarComponent | ComponentClass<ToolbarComponentProps, any> | FunctionComponent<ToolbarComponentProps> | | Component that will replace default toolbar renderer. |
views | Array<'year' | 'date' | 'month'> | | Array of views to show. |