Calendar

Event calendar with month, week, and day schedules.

Calendar

Display

Switchable views

Code copied

Locked view

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

Code copied

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.

Code copied

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.

Code copied

PROPS

PropertyTypeValuesDescriptiondefaultExampleMore
size'small' | 'medium' | 'large'small / medium / largeCalendar visual density. Medium is the default; large preserves the original spacious cells.medium
eventsCalendarEvent[]{ 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-dataunknown[]application-owned schedule dataOpaque schedule records. Use event-adapter to map any domain model into display events.[]
event-adapterFunction(data{ viewstartend }) => CalendarEvent[]Translates event-data into the flat events Calendar renders. Keeps recurrence and business rules outside Calendar.
event-displayFunction(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-limitNumber0+Number of events shown directly in a month/all-day cell. The default keeps the earliest event plus a `+n` overflow trigger.1
date / v-model:dateStringYYYY-MM-DDControls the visible month, week, or day without changing selection.current date
view / v-model:viewmonth | week | daymonth / week / dayActive scheduler view.month
viewsArraymonth / week / dayAllowed views. A single item locks the calendar to that view and hides the switcher.['month', 'week', 'day']
editableBooleantrue / falseEnables dragging timed events to a new day and time.false
hour-start / hour-endNumber0 - 24Time grid bounds for week and day views.0 / 24
hour-format'12' | '24'12 / 24Hour labels for week and day views. Stored values always remain local ISO time.24
schedule-heightNumberpixelsScrollable height for week and day schedules. Set 0 to render every hour without an internal scroll area.640
event-colorStringCSS colorDefault event color when an event has no color.primary
context-menu-itemsContextMenuItem[]{ labelvalue?icon?disabled?divided? }[]Static right-click menu for events, dates, and time slots.[]
get-context-menu-itemsFunction(context) => ContextMenuItem[]Resolve menu items for the right-clicked event, date, or time. Receives { type, date, event? }.
context-menu-min-widthNumberpixelsMinimum width of the context menu panel.184
model-value/v-modelString | String[]YYYY-MM-DDSelected date or selected date range.''
rangeBooleantrue / falseSelect a date range.false
multipleBooleantrue / falseToggle arbitrary dates. Dragging and Shift-click append continuous date ranges.false
first-day-of-weekNumber0 - 6Week start day, 0 for Sunday and 1 for Monday.1
disabled-dateFunction(date) => booleanDisable matching dates.
show-week-numberBooleantrue / falseShow ISO week numbers.false
No matching data

SLOTS

PropertyTypeValuesDescriptiondefaultExampleMore
date-cellCustom cell content. Receives CalendarCell.
eventCustom month/all-day event content. Receives { event, date, display, allDay }.
event-overflowCustom overflow row. Receives { event, date, display, allDay, edit, remove }.
time-eventCustom week/day timed-event content. Receives { event, date, display }.
context-menuCustom menu content. Receives { context, close }.
No matching data

EVENTS

PropertyTypeValuesDescriptiondefaultExampleMore
event-clickEmits the clicked CalendarEvent.
event-editEmits the double-clicked CalendarEvent. Persisting edits remains application-owned.
event-deleteEmits the CalendarEvent selected for deletion in the `+n` overflow menu. Remove its full source record in application data when appropriate.
event-overflowEmits { date, events } when a month/all-day cell overflow menu opens.
event-changeEmits { event, start, end, source } after a timed-event drag.
cell-clickEmits YYYY-MM-DD or YYYY-MM-DDTHH:mm for an empty cell click.
view-change / panel-changeActive view and visible date changes.
context-menu / context-menu-selectOpen context and selected menu item. Selection returns { item, context }; context.dates is the selected date range.
No matching data

EXPOSES

PropertyTypeValuesDescriptiondefaultExampleMore
clearSelectionClears the current date, range, or multiple-date selection and synchronizes v-model.
No matching data
Last Updated: 2026-08-17, 08:33:54