Skip to main content

Type Alias: DayPickerContext<T>

DayPickerContext<T>: {classNames: ClassNames;components: CustomComponents;formatters: Formatters;getModifiers: (day) => Modifiers;goToMonth: (month) => void;isSelected: (date) => boolean | undefined;labels: Labels;months: CalendarMonth[];nextMonth: Date | undefined;previousMonth: Date | undefined;select: SelectHandler<T> | undefined;selected: SelectedValue<T> | undefined;styles: Partial<Styles> | undefined; }

Type Parameters​

Type Parameter
T extends DayPickerProps

Type declaration​

NameTypeDescription
classNamesClassNamesThe class names for the UI elements.
componentsCustomComponentsThe components used internally by DayPicker.
formattersFormattersThe formatters used to format the UI elements.
getModifiers(day) => ModifiersReturns the modifiers for the given day.
goToMonth(month) => voidNavigate to the specified month. Will fire the onMonthChange callback.
isSelected(date) => boolean | undefinedWhether the given date is selected.
labelsLabelsThe labels used in the user interface.
monthsCalendarMonth[]The months displayed in the calendar.
nextMonthDate | undefinedThe next month to display.
previousMonthDate | undefinedThe previous month to display.
selectSelectHandler<T> | undefinedSet a selection.
selectedSelectedValue<T> | undefinedThe selected date(s).
stylesPartial<Styles> | undefinedThe styles for the UI elements.

Defined in​

src/useDayPicker.ts:21