Span Calendar
A scheduling calendar with month, week and day views, events that share the width when they overlap, a live current-time line, and drag to move, resize or draw events.
pixikit.com/docs/app-ui/data/span-calendar
Customize
Default view
Day start7
Day end20
Step15min
Week start1
Hour12
Height560px
Props
18| Name | Type | Default | Description |
|---|---|---|---|
view | SpanView | None | The view when controlled. |
defaultView | SpanView | "week" | The view at first. |
onViewChange | (view: SpanView) => void | None | Called with the view the user switched to. |
date | Date | None | The focused day when controlled. |
defaultDate | Date | None | The focused day at first. Default: today. |
onDateChange | (date: Date) => void | None | Called with the day that came into focus. |
events | SpanEvent[] | [] | The events to show. |
onEventChange | (id: string, range: SpanRange) => void | None | Called with the new times when an event is dragged or resized. Turns dragging on. |
onEventCreate | (range: SpanRange) => void | None | Called with the times of a new event drawn on empty time, or from a double-click on a month day. Turns drawing on. |
onEventSelect | (id: string) => void | None | Called with the id of an event that was clicked or opened with Enter. |
dayStart | number | 7 | The first hour of the week and day views, 0 to 23. |
dayEnd | number | 20 | The hour the week and day views end at, 1 to 24. |
step | number | 15 | Minutes events snap to when dragged or resized. |
weekStart | number | None | The first day of the week, 0 for Sunday to 6. Default: from the locale, else Monday. |
locale | string | "en-US" | The language of the names and times, as for `Intl`. |
hour12 | boolean | None | Forces a 12 or 24 hour clock. Default: from the locale. |
height | number | 560 | The height of the calendar in px. |
className | string | None |