Props
All props are optional, but a calendar shows nothing until it has data and an
activeTimeDateField that matches it.
Overview
| Prop | Type | Default |
|---|---|---|
data | Record<string, any>[] | [] |
activeTimeDateField | string | '' |
currentView | string | 'MONTH' |
currentDate | string | Date | today |
setCurrentDate | (date: string | Date) => void | none, navigation hidden |
weekStartsOn | number (0–6) | 1 (Monday) |
locale | date-fns Locale | enUS |
todayLabel | string | 'Today' |
timeDateFormat | { day?, hour?, monthYear? } | { day: 'EEE', hour: 'hh a', monthYear: 'MMMM yyyy' } |
colorDots | ColorDot[] | none |
cellDisplayMode | CellDisplayMode | all cells expanded |
disableHoverEffect | boolean | false |
renderItem | (item, isHovered) => JSX.Element | default item |
renderItemText | (item) => JSX.Element | title and time |
renderHeaderItem | (item, extras) => JSX.Element | default item |
renderHeaderItemText | (item) => JSX.Element | title |
onItemClick | (item, event) => void | none |
onCellClick | (dateInfo, event) => void | none |
onCellHeaderClick | (dateInfo, event) => void | none |
onDayNumberClick | (day: string, event) => void | none |
onDayStringClick | (day: string | Date, event) => void | none |
onHourClick | (value: DateInfo | number, event) => void | none |
onColorDotClick | (dot: ColorDot, event) => void | none |
The exact TypeScript declarations are on the TypeScript page.
Data
data
The items to show. Each item needs a unique, truthy id and the date fields named by
activeTimeDateField. title, bgColor and textColor are used by the default
rendering; any other fields are kept and passed back to you.
See Data & positioning.
activeTimeDateField
The field that positions items, such as 'startTime', or two fields joined by - for
an interval, such as 'startTime-endTime'. Items without a value in these fields are
not shown. Field names cannot contain -.
View and navigation
currentView
One of 'MONTH', 'WEEK', 'WEEK_TIME', 'DAY', 'DAY_REVERSE',
'WEEK_IN_PLACE' or 'DAY_IN_PLACE'. See Views.
currentDate
The date whose month, week or day is shown, as 'yyyy-MM-dd' or a Date. Defaults to
today. The calendar does not change it on its own.
setCurrentDate
Called by the built-in navigation with the new date as 'yyyy-MM-dd'. Passing it
shows the previous, next and “Today” buttons; leaving it out hides them.
See Navigation.
weekStartsOn
The first day of the week, from 0 (Sunday) to 6 (Saturday). Applies to MONTH,
WEEK, WEEK_TIME and WEEK_IN_PLACE.
Language and formats
locale
A date-fns locale used for day and month names. See Localization.
todayLabel
The text of the “Today” button.
timeDateFormat
date-fns format strings for the weekday names
(day), hour labels (hour) and navigation title (monthYear). Keys you leave out
keep their defaults. See Localization.
Appearance
colorDots
Dots that mark whole days, with a generated legend. Each dot is
{ color, text, date } with date as 'yyyy-MM-dd'. See Color dots.
cellDisplayMode
Collapses cells in MONTH, WEEK, WEEK_IN_PLACE and DAY_IN_PLACE so each shows
only its last item. See Collapsing cells.
{ MONTH: { state: 'CUSTOM', inactiveCells: ['2025-06-03'] } }disableHoverEffect
Turns off hover tracking. Items then never get the item--hovered and
sub-item--hovered classes, and renderItem always receives isHovered = false.
Custom rendering
renderItem
Replaces the whole item. Receives the item and whether it is hovered.
renderItemText
Replaces only the content of the default item. Ignored when renderItem is set.
renderHeaderItem
Replaces items in the row above the timeline in WEEK_TIME and DAY, which holds
items longer than 24 hours. Receives the item and
{ gridColumn, isFromPrevious, isFromNext }. Custom header items do not call
onItemClick on their own.
renderHeaderItemText
Replaces only the content of those header items.
See Custom rendering for examples.
Callbacks
Every callback receives a value and the React mouse event. See Interactions & callbacks for a live log of what each one receives.
onItemClick
An item was clicked. Receives the item with all your fields.
onCellClick
An empty part of a cell was clicked. Receives a
DateInfo whose timeDate is the cell’s key.
onCellHeaderClick
The header strip of a day column was clicked, in WEEK_TIME, DAY, WEEK_IN_PLACE
and DAY_IN_PLACE. Receives a DateInfo.
onDayNumberClick
A day number was clicked. Receives the date as 'yyyy-MM-dd'.
onDayStringClick
A weekday name was clicked. Receives the date as 'yyyy-MM-dd'; in day views it
receives currentDate as you passed it.
onHourClick
An hour label was clicked. Receives the hour as a number in WEEK_TIME and
WEEK_IN_PLACE, and a DateInfo with hour in DAY, DAY_REVERSE and
DAY_IN_PLACE.
onColorDotClick
A color dot or its legend entry was clicked. Receives the dot object.