Day, week, month and agenda views for scheduled work. Drag across empty time, or click it, to book a slot with a quick-create card. Drag an event to move it, drag its top or bottom edge to resize it. Everything snaps, nothing animates while the pointer moves, and a change you reject settles back. Keyboard users pick an event up with Space. Below 640px wide it opens on one day with a week strip, and Week reads as a list. Time zones and clock changes are handled with Intl, no date library.
On this page
Examples
Installation
Installation is part of Pro
Pro components install from a licensed registry. The live preview stays open to everyone.
Props
- events
CalendarEvent[]- { id, title, start, end, allDay?, kind?, status?, agent?, calendarId?, color?, editable? }. The component never edits it: you do, in the callbacks.
- view / defaultView / onViewChange
"day"|"week"|"month"|"agenda"- Default
"week" - The view shown. Day and week are time grids, month has chips (or dots) with +N more, agenda is a list.
- monthDensity / agendaBelow
"chips"|"dots" / number- Default
"chips" / 640 - Month cells show titles or dots. Below this container width (not the viewport) the page opens on Day with a week strip, Week shows the agenda, Month shows dots and quick-create is a bottom sheet; 0 turns it off.
- date / defaultDate / onDateChange
Date- Default
now - Any instant in the day or week. Today, previous and next page it.
- timeZone / locale / weekStartsOn
string / string / number- Default
viewer's / browser / 1 - The grid is read on the clock of this IANA zone. A day with a clock change is 23 or 25 hours long, and a missing hour holds nothing.
- snap / defaultDuration
5|10|15|30 / number- Default
15 / 30 - Minutes one step of dragging, resizing and the keyboard is, and the length of an event made with a click.
- hourHeight / height / scrollToHour
number- Default
48 / 560 / 8 - Pixels per hour, height of the scrolling grid, and the hour in view when it opens.
- calendars / agents
CalendarSource[] / string[]- Fill the Calendar and Agent selects of the quick-create card, and set event colours.
- onCreate
(draft, source) => void- The card was saved. source is drag, click or keyboard.
- onEventChange
(event, { start, end }, kind) => void|boolean|Promise- A move or resize was dropped. Return false or reject to put it back: the block settles to its place and a screen reader hears it.
- detail / renderDetail
boolean / fn- Default
true - Tapping an event opens its detail card (title, calendar, time in the zone, cron in words, agent, run status with duration, cost and Open trace). false turns it off; renderDetail(event, close) replaces the body.
- onEventUpdate / onEventDuplicate / onEventDelete / onEventRestore / onRunNow / onOpenTrace
fn- Actions on the card. A button shows only when its callback is passed. Edit opens the quick-create fields filled in; Delete shows an Undo row when onEventRestore is passed. Finished runs have Edit, Duplicate and Delete disabled with a reason.
- onEventOpen / renderCreate / now
fn / fn / Date- A click or Enter on an event, a replacement body for the quick-create card, and a pinned clock for tests.
| Prop | Type | Default | Description |
|---|---|---|---|
| events | CalendarEvent[] | - | { id, title, start, end, allDay?, kind?, status?, agent?, calendarId?, color?, editable? }. The component never edits it: you do, in the callbacks. |
| view / defaultView / onViewChange | "day" | "week" | "month" | "agenda" | "week" | The view shown. Day and week are time grids, month has chips (or dots) with +N more, agenda is a list. |
| monthDensity / agendaBelow | "chips" | "dots" / number | "chips" / 640 | Month cells show titles or dots. Below this container width (not the viewport) the page opens on Day with a week strip, Week shows the agenda, Month shows dots and quick-create is a bottom sheet; 0 turns it off. |
| date / defaultDate / onDateChange | Date | now | Any instant in the day or week. Today, previous and next page it. |
| timeZone / locale / weekStartsOn | string / string / number | viewer's / browser / 1 | The grid is read on the clock of this IANA zone. A day with a clock change is 23 or 25 hours long, and a missing hour holds nothing. |
| snap / defaultDuration | 5 | 10 | 15 | 30 / number | 15 / 30 | Minutes one step of dragging, resizing and the keyboard is, and the length of an event made with a click. |
| hourHeight / height / scrollToHour | number | 48 / 560 / 8 | Pixels per hour, height of the scrolling grid, and the hour in view when it opens. |
| calendars / agents | CalendarSource[] / string[] | - | Fill the Calendar and Agent selects of the quick-create card, and set event colours. |
| onCreate | (draft, source) => void | - | The card was saved. source is drag, click or keyboard. |
| onEventChange | (event, { start, end }, kind) => void | boolean | Promise | - | A move or resize was dropped. Return false or reject to put it back: the block settles to its place and a screen reader hears it. |
| detail / renderDetail | boolean / fn | true | Tapping an event opens its detail card (title, calendar, time in the zone, cron in words, agent, run status with duration, cost and Open trace). false turns it off; renderDetail(event, close) replaces the body. |
| onEventUpdate / onEventDuplicate / onEventDelete / onEventRestore / onRunNow / onOpenTrace | fn | - | Actions on the card. A button shows only when its callback is passed. Edit opens the quick-create fields filled in; Delete shows an Undo row when onEventRestore is passed. Finished runs have Edit, Duplicate and Delete disabled with a reason. |
| onEventOpen / renderCreate / now | fn / fn / Date | - | A click or Enter on an event, a replacement body for the quick-create card, and a pinned clock for tests. |
Keyboard: Tab to the grid, arrow keys move a cursor over empty time and Enter opens the card there. On an event, Space or M picks it up, arrow keys move it by one snap or one day, Shift and Up or Down resize the end, Alt and Shift resize the start, Enter drops it and Escape cancels; every step is announced. In month view drag a chip to another day (it keeps its time of day), click an empty day to book, and Alt with the arrows moves a focused chip a day or a week. On touch, press and hold 250ms to start a drag, so a swipe still scrolls; dragging near the top or bottom edge scrolls the grid. Events appear with a 120ms fade after the first render and a status dot pops when its status changes; reduced motion shows both at once. Events at the same time sit side by side, and a short event wraps its title before it loses it. cronTimes(expr, from, to, timeZone) expands a cron expression into the instants it fires, so a schedule can become events. All-day events show in a strip above the grid and are not draggable in this version.
When to use
When to use
- A schedule of agent runs, results and meetings you can book, move and resize: day and week grid.
- A planner where a person drags a run to another time and your code confirms or rejects it.
When not to use
- Choosing a day or a range in a form: use Calendar.
- Times of one day to book from: use Time Slots.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI Event Calendar to my app and wire it to my own data.
- I need a schedule of agent runs, results and meetings you can book, move and resize: day and week grid. Set that up with the Knowns UI Event Calendar.
- Which Event Calendar props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "event-calendar" }) and search_docs({ query: "event calendar" }). Pro props, full examples and source come back once your license key is in the MCP config.