Skip to main content

Variable: DayPickerContext#

โ€ข Const DayPickerContext: Context<undefined | DayPickerBase & DayPickerRange & { captionLayout: CaptionLayout ; classNames: Required<Partial<StyledElement<string>>> ; components: Components ; formatters: Formatters ; fromMonth?: undefined ; fromYear?: undefined ; labels: Labels ; locale: Locale ; modifierClassNames: Record<string, string> ; modifierPrefix: string ; modifiers: Modifiers ; numberOfMonths: number ; styles: Partial<StyledElement<CSSProperties>> ; toMonth?: undefined ; toYear?: undefined ; today: Date } | DayPickerBase & DayPickerMultiple & { captionLayout: CaptionLayout ; classNames: Required<Partial<StyledElement<string>>> ; components: Components ; formatters: Formatters ; fromMonth?: undefined ; fromYear?: undefined ; labels: Labels ; locale: Locale ; modifierClassNames: Record<string, string> ; modifierPrefix: string ; modifiers: Modifiers ; numberOfMonths: number ; styles: Partial<StyledElement<CSSProperties>> ; toMonth?: undefined ; toYear?: undefined ; today: Date } | DayPickerBase & DayPickerSingle & { captionLayout: CaptionLayout ; classNames: Required<Partial<StyledElement<string>>> ; components: Components ; formatters: Formatters ; fromMonth?: undefined ; fromYear?: undefined ; labels: Labels ; locale: Locale ; modifierClassNames: Record<string, string> ; modifierPrefix: string ; modifiers: Modifiers ; numberOfMonths: number ; styles: Partial<StyledElement<CSSProperties>> ; toMonth?: undefined ; toYear?: undefined ; today: Date } | DayPickerBase & DayPickerUncontrolled & { captionLayout: CaptionLayout ; classNames: Required<Partial<StyledElement<string>>> ; components: Components ; formatters: Formatters ; fromMonth?: undefined ; fromYear?: undefined ; labels: Labels ; locale: Locale ; modifierClassNames: Record<string, string> ; modifierPrefix: string ; modifiers: Modifiers ; numberOfMonths: number ; styles: Partial<StyledElement<CSSProperties>> ; toMonth?: undefined ; toYear?: undefined ; today: Date }>

The DayPicker context shares the props passed to DayPicker within the internal components. It is used to set the default values and perform one-time calculations required to render the days.

Access this context from the useDayPicker hook when using custom components.