Getting StartedStateThemingCompositionDate FrameworksLocalizationAnimatedGroupAnimatedMonthGroupCalendarCalendarProviderPropsClickOutsideDayDayOfWeekHeaderHomeMonthMonthGroupPopperRootWeekWeekHeaderuseCalendarDispatchuseCalendarPropsuseCalendarStateuseDateAPIuseDateInputuseDateRangeInput
Components
Hooks
CalendarProvider
A CalendarProvider
creates a Context required to link a Calendar
with other components and holds the state of the component.
To interact with the config or state created by the context, you should use the hooks provided.
You can either wrap a composition in CalendarProvider
yourself or if using Calendar
on it's own, then Calendar
will create the context for you.
Refer to the useDateInput and useDateRange documentation for examples.
Props
Prop Name | Type | Is Required | Default Value | Description |
---|---|---|---|---|
actions | object | optional | Imperative actions API | |
adapter | func | optional | Date API adapter | |
allowRange | bool | optional | false | Allow date range |
children | node | optional | Calendar children | |
ignoreClickOutsideRefs | array | optional | [] | Array of elements to ignore, when determining a click outside, used to link elements, like date inputs |
components | object | optional | {} | Custom Component overrides |
initialEnableKeyboardNavigation | bool | optional | false | Initial state of keyboard navigation |
initialSelectedDate | object or array | optional | Initial selected date | |
initialVisibleFromMonth | object | optional | Initial visible month | |
isDayDisabled | func | optional | Day is disabled callback | |
isRangeValid | func | optional | Date range is valid callback | |
numOfColumns | number | optional | 1 | Number of columns |
numOfVisibleMonths | number | optional | 1 | Number of visible months |
onCalendarChange | func | optional | Selected date change handler | |
onStateChange | func | optional | State change handler | |
reducers | array of funcs | optional | Reducer(s), to override default state | |
weekOffset | number | optional | Start of week offset from date API's default |