Calendar

Event calendar with month, week, and day schedules.

Calendar

Locked view

Pass one item to views when a calendar should keep a single presentation and hide the view switcher.

Schedule data

Create flat events from an external form. Existing events can be edited from the demo; Calendar emits intent while the application updates its own data.

Domain schedule data and selection actions

Calendar renders flat CalendarEvent[], but your application can retain any schedule model. Pass raw records through event-data, then use event-adapter to map them. A cell shows its earliest event and +n; hover changes +n to an overflow icon, and click opens every event for that date. The default row emits edit/delete intent with the original CalendarEvent; this demo resolves it back to the complete source record, so editing or deleting affects the full schedule rather than only one rendered day. Compact markers show a point/range time, a range start (08:00~), or a range end (~18:00); use event-display or event slots for custom output.

API

PROPS

Property
Type
Values
Description
default
Example
More
size
'small' | 'medium' | 'large'
small / medium / large
Calendar visual density. Medium is the default; large preserves the original spacious cells.
medium
—
events
[]
{ idtitlestartend?allDay?color?display?data? }[]
Schedule data. Accepts all-day dates and local ISO time ranges. `display` can override one event's compact time marker or segment.
[]
—
event-data
unknown[]
application-owned schedule data
Opaque schedule records. Use event-adapter to map any domain model into display events.
[]
—
event-adapter
Function
(data{ viewstartend }) => CalendarEvent[]
Translates event-data into the flat events Calendar renders. Keeps recurrence and business rules outside Calendar.
—
—
event-display
Function
(event{ dateviewallDaysegment }) => string | { title?time?segment? }
Customizes compact event labels. Defaults distinguish time points, same-day ranges, range starts (`08:00~`), and range ends (`~18:00`).
—
—
event-limit
Number
0+
Number of events shown directly in a month/all-day cell. The default keeps the earliest event plus a `+n` overflow trigger.
1
—
v-model:date
String
YYYY-MM-DD
Controls the visible month, week, or day without changing selection.
current date
—
v-model:view
month | week | day
month / week / day
Active scheduler view.
month
—
views
Array
month / week / day
Allowed views. A single item locks the calendar to that view and hides the switcher.
['month', 'week', 'day']
—
editable
Boolean
true / false
Enables dragging timed events to a new day and time.
false
—
hour-start
Number
0 - 24
Time grid bounds for week and day views.
0
—
hour-end
Number
0 - 24
Time grid bounds for week and day views.
24
—
hour-format
'12' | '24'
12 / 24
Hour labels for week and day views. Stored values always remain local ISO time.
24
—
schedule-height
Number
pixels
Scrollable height for week and day schedules. Set 0 to render every hour without an internal scroll area.
640
—
event-color
String
CSS color
Default event color when an event has no color.
primary
—
context-menu-items
[]
{ labelvalue?icon?disabled?divided? }[]
Static right-click menu for events, dates, and time slots.
[]
—
get-context-menu-items
Function
(context: CalendarContextMenuContext) => ContextMenuItem[]
Resolve menu items for the right-clicked event, date, or time. The context contains type, date, dates, and an optional event.
—
—
context-menu-min-width
Number
pixels
Minimum width of the context menu panel.
184
—
v-model
String | String[]
YYYY-MM-DD
Selected date or selected date range.
''
—
range
Boolean
true / false
Select a date range.
false
—
multiple
Boolean
true / false
Toggle arbitrary dates. Dragging and Shift-click append continuous date ranges.
false
—
first-day-of-week
Number
0 - 6
Week start day, 0 for Sunday and 1 for Monday. Inherits global firstDayOfWeek when omitted; week numbers also follow global firstWeekContainsDate (default 4).
1
—
disabled-date
Function
(date) => boolean
Disable matching dates.
—
—
show-week-number
Boolean
true / false
Show ISO week numbers.
false
—

EVENTS

Event
Type
Description
default
Example
More
event-click
—
Emits the clicked CalendarEvent.
—
—
event-edit
—
Emits the double-clicked CalendarEvent. Persisting edits remains application-owned.
—
—
event-delete
—
Emits the CalendarEvent selected for deletion in the `+n` overflow menu. Remove its full source record in application data when appropriate.
—
—
event-overflow
—
Emits { date, events } when a month/all-day cell overflow menu opens.
—
—
event-change
—
Emits { event, start, end, source } after a timed-event drag.
—
—
cell-click
—
Emits YYYY-MM-DD or YYYY-MM-DDTHH:mm for an empty cell click.
—
—
view-change
—
Active view and visible date changes.
—
—
panel-change
—
Active view and visible date changes.
—
—
context-menu
—
Emits the `CalendarContextMenuContext` when the menu opens; `context.dates` is the current selected date range.
—
—
context-menu-select
—
Emits `{ item, context }` after a menu item is selected; context is the same menu-open snapshot.
—
—

SLOTS

Slot
Scope
Description
default
Example
More
date-cell
{ cell: }
Custom cell content. Receives CalendarCell.
—
—
event
{ event: ; date: string; display: ; allDay: boolean }
Custom month/all-day event content. Receives { event, date, display, allDay }.
—
—
event-overflow
{ event: ; date: string; display: ; allDay: boolean; edit: () => void; remove: () => void }
Custom overflow row. Receives { event, date, display, allDay, edit, remove }.
—
—
time-event
{ event: ; date: string; display: }
Custom week/day timed-event content. Receives { event, date, display }.
—
—
context-menu
{ context: ; close: () => void }
Custom menu content. Receives `{ context, close }`.
—
—

EXPOSES

Method
Type
Description
default
Example
More
clearSelection
—
Clears the current date, range, or multiple-date selection and synchronizes v-model.
—
—
Last Updated: 2026-10-28, 06:17:56 UTC
Copied