Skip to main content

CalendarContextProvider

<CalendarContextProvider
date={initialDate}
onDateChanged={onDateChanged}
onMonthChange={onMonthChange}
showTodayButton
>
{children}
/>
TIP
This component extends the CalendarProvider props.
APIThis is the list of additional props for the component

date
string
​

Initial date in 'yyyy-MM-dd' format. Default is now

disableAutoDaySelection
CalendarNavigationTypes[]
​

The calendar navigation type in which to disable the auto day selection (get options from ExpandableCalendar.navigationTypes)

disabledOpacity
number
​

The opacity for the disabled today button (0-1)

onDateChanged
(date: string, updateSource: UpdateSource) => void
​

Handler which gets executed when the date changes

onMonthChange
(date: DateData, updateSource: UpdateSource) => void
​

Handler which gets executed when the month changes

showTodayButton
boolean
​

Whether to show the today button. Default is true

todayBottomMargin
number
​

Today button's top position