Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/netzo/deps/react-day-picker.ts>DayPickerBase

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
interface DayPickerBase
import { type DayPickerBase } from "https://deno.land/x/netzo@0.4.78/deps/react-day-picker.ts";

The base props for the DayPicker component and the DayPickerContext.

Properties

optional
className: string

The CSS class to add to the container element. To change the name of the class instead, use classNames.root.

optional
classNames: ClassNames

Change the class names of the HTML elements.

Use this prop when you need to change the default class names — for example when using CSS modules.

optional
modifiersClassNames: ModifiersClassNames

Change the class name for the day matching the modifiers.

optional
style: CSSProperties

Style to apply to the container element.

optional
styles: Styles

Change the inline styles of the HTML elements.

optional
modifiersStyles: ModifiersStyles

Change the inline style for the day matching the modifiers.

optional
id: string

A unique id to replace the random generated id – used by DayPicker for accessibility.

optional
defaultMonth: Date

The initial month to show in the calendar. Use this prop to let DayPicker control the current month. If you need to set the month programmatically, use month]] | and [[onMonthChange.

optional
month: Date

The month displayed in the calendar.

As opposed to DayPickerBase.defaultMonth, use this prop with DayPickerBase.onMonthChange to change the month programmatically.

optional
onMonthChange: MonthChangeEventHandler

Event fired when the user navigates between months.

optional
numberOfMonths: number

The number of displayed months.

optional
fromDate: Date

The earliest day to start the month navigation.

optional
toDate: Date

The latest day to end the month navigation.

optional
fromMonth: Date

The earliest month to start the month navigation.

optional
toMonth: Date

The latest month to end the month navigation.

optional
fromYear: number

The earliest year to start the month navigation.

optional
toYear: number

The latest year to end the month navigation.

optional
disableNavigation: boolean

Disable the navigation between months.

optional
pagedNavigation: boolean

Paginate the month navigation displaying the numberOfMonths at time.

optional
reverseMonths: boolean

Render the months in reversed order (when numberOfMonths is greater than 1) to display the most recent month first.

optional
captionLayout: CaptionLayout

Change the layout of the caption:

  • buttons: display prev/right buttons
  • dropdown: display drop-downs to change the month and the year

Note: the dropdown layout is available only when fromDate, fromMonth orfromYear and toDate, toMonth or toYear are set.

optional
fixedWeeks: boolean

Display six weeks per months, regardless the month’s number of weeks. To use this prop, showOutsideDays must be set.

optional
hideHead: boolean

Hide the month’s head displaying the weekday names.

optional
showOutsideDays: boolean

Show the outside days. An outside day is a day falling in the next or the previous month.

optional
showWeekNumber: boolean

Show the week numbers column. Weeks are numbered according to the local week index.

  • to use ISO week numbering, use the ISOWeek prop.
  • to change how the week numbers are displayed, use the Formatters prop.
optional
weekStartsOn:
| 0
| 1
| 2
| 3
| 4
| 5
| 6

The index of the first day of the week (0 - Sunday). Overrides the locale's one.

optional
firstWeekContainsDate: 1 | 4

The day of January, which is always in the first week of the year. Can be either Monday (1) or Thursday (4).

optional
ISOWeek: boolean

Use ISO week dates instead of the locale setting. Setting this prop will ignore weekStartsOn and firstWeekContainsDate.

optional
components: CustomComponents

Map of components used to create the layout. Look at the components source to understand how internal components are built and provide your custom components.

optional
initialFocus: boolean

When a selection mode is set, DayPicker will focus the first selected day (if set) or the today's date (if not disabled).

Use this prop when you need to focus DayPicker after a user actions, for improved accessibility.

optional
disabled: Matcher | Matcher[] | undefined

Apply the disabled modifier to the matching days.

optional
hidden: Matcher | Matcher[] | undefined

Apply the hidden modifier to the matching days. Will hide them from the calendar.

optional
selected: Matcher | Matcher[] | undefined

Apply the selected modifier to the matching days.

optional
today: Date

The today’s date. Default is the current date. This Date will get the today modifier to style the day.

optional
modifiers: DayModifiers

Add modifiers to the matching days.

optional
locale: Locale

The date-fns locale object used to localize dates.

optional
labels: Partial<Labels>

Labels creators to override the defaults. Use this prop to customize the ARIA labels attributes.

optional
formatters: Partial<Formatters>

A map of formatters. Use the formatters to override the default formatting functions.

optional
dir: HTMLDivElement["dir"]

The text direction of the calendar. Use ltr for left-to-right (default) or rtl for right-to-left.

optional
nonce: HTMLDivElement["nonce"]

A cryptographic nonce ("number used once") which can be used by Content Security Policy for the inline style attributes.

optional
title: HTMLDivElement["title"]

Add a title attribute to the container element.

optional
lang: HTMLDivElement["lang"]

Add the language tag to the container element.

optional
onNextClick: MonthChangeEventHandler

Event callback fired when the next month button is clicked.

optional
onPrevClick: MonthChangeEventHandler

Event callback fired when the previous month button is clicked.

optional
onWeekNumberClick: WeekNumberClickEventHandler

Event callback fired when the week number is clicked. Requires showWeekNumbers set.

optional
onDayClick: DayClickEventHandler

Event callback fired when the user clicks on a day.

optional
onDayFocus: DayFocusEventHandler

Event callback fired when the user focuses on a day.

optional
onDayBlur: DayFocusEventHandler

Event callback fired when the user blurs from a day.

optional
onDayMouseEnter: DayMouseEventHandler

Event callback fired when the user hovers on a day.

optional
onDayMouseLeave: DayMouseEventHandler

Event callback fired when the user hovers away from a day.

optional
onDayKeyDown: DayKeyboardEventHandler

Event callback fired when the user presses a key on a day.

optional
onDayKeyUp: DayKeyboardEventHandler

Event callback fired when the user presses a key on a day.

optional
onDayKeyPress: DayKeyboardEventHandler

Event callback fired when the user presses a key on a day.

optional
onDayPointerEnter: DayPointerEventHandler

Event callback fired when the pointer enters a day.

optional
onDayPointerLeave: DayPointerEventHandler

Event callback fired when the pointer leaves a day.

optional
onDayTouchCancel: DayTouchEventHandler

Event callback when a day touch event is canceled.

optional
onDayTouchEnd: DayTouchEventHandler

Event callback when a day touch event ends.

optional
onDayTouchMove: DayTouchEventHandler

Event callback when a day touch event moves.

optional
onDayTouchStart: DayTouchEventHandler

Event callback when a day touch event starts.