Skip to main content

Calendar

The Calendar component is an implementation of FullCalendar (version 7) as a Perspective component. It supports multiple calendar views, event display and interaction, drag-and-drop scheduling, and built-in popups for creating and editing events.

Two optional built-in popups are available but disabled by default. The Event Popup appears when an event is clicked and can optionally allow editing. The Create Event Popup appears when a date or time block is clicked. Neither popup modifies the calendar directly — all changes are surfaced through component events for handling in scripts.

The Calendar component works alongside the External Event Box component to support drag-and-drop scheduling from an external list of events onto the calendar.

Properties

NameDescriptionProperty Type
editableAllows events to be dragged to new times and resized.boolean
selectableAllows selecting a single date or a range of dates.boolean
selectedDateWhen selectable is true and a selection is made, reflects the current selection with start and end string properties.object
selectedEventsThe currently selected events. A single click selects an event (replacing the current selection); Ctrl/Cmd or Shift-click toggles individual events. Can also be written to programmatically to drive the selection.array
defaultViewThe initial calendar view displayed when the component loads. Default is dayGridMonth.string
currentViewThe currently displayed view. Writing to this property will change the view. If an invalid view name is written, the component will reset to the current view. Valid options are: dayGridMonth, dayGridWeek, dayGridDay, dayGridYear, timeGridWeek, timeGridDay, listYear, listMonth, listWeek, listDay, multiMonthYear.string
eventsAn array of event objects to display on the calendar. See Event Object Properties below.array
longPressDelayFor touch devices, the time in milliseconds the user must hold down before an event becomes draggable or a date becomes selectable. Default is 1000.integer

Event Object Properties

Each item in the events array supports the following properties. Only start is required.

NameDescriptionProperty Type
idA unique identifier for the event. Defaults to an empty string if not provided.string or number
groupIdEvents sharing the same groupId will be dragged and resized together.string or number
titleThe text displayed on the event.string
startRequired. When the event starts, as a parseable date/time string. If no end is defined, the event defaults to all-day on the start date. If start includes a time and end is omitted, the event duration defaults to one hour.string
endWhen the event ends. This value is exclusive — an all-day event ending on 2020-09-03 spans through 2020-09-02.string
allDayWhen true, the event ignores any time portion of start and end.boolean
colorThe background and border color of the event.string
contrastColorThe text color of the event (foreground color that contrasts with color).string
displayOverrides the display style for this individual event. Same options as eventDisplay.eventDisplayType.string
editableOverrides the component-level editable setting for this specific event.boolean
startEditableWhether the start date/time of this event can be changed by dragging.boolean
durationEditableWhether the duration of this event can be changed by resizing.boolean
overlapWhether this event is allowed to overlap other events when being dragged or resized.boolean
ownerIdAn identifier for the owner of the event.string or number

Example event object:

{
"id": "1",
"title": "Production Run A",
"start": "2026-06-23T09:00:00",
"end": "2026-06-23T11:00:00",
"color": "#d40000",
"contrastColor": "#ffffff"
}

Event Pop Properties

NameDescriptionProperty Type
useEventPopWhether the built-in popup for showing event details will appear when an event is clicked.boolean
canEditEventOnPopWhether the edit button appears on the built-in event popup.boolean
canExportEventOnPopWhether the event can be exported as an iCal object from the popup.boolean
useCreateEventPopWhether the built-in popup for creating events appears when a date or time block is clicked.boolean

Event Display Properties

NameDescriptionProperty Type
eventDisplayTypeControls the default rendering style for all events. Options: auto (solid block for all-day/multi-day, dot for timed events in daygrid), block (always solid block in daygrid), list-item (always dot in daygrid), background (highlights background), inverse-background (highlights inverse background), none (not rendered). Default colors are set via theme.palette.string
displayEventTimeWhether to show the start time on timed (non-all-day) events.boolean
displayEventEndWhether to show the end time on events.boolean
nextDayThresholdThe minimum time that must pass into a day for a spanning event to be rendered on that day in daygrid view. Format: HH:mm:ss.string
eventOrderDetermines display order when events occupy the same space. Uses event property names; prefix with - for descending order. Default is start,-duration,allDay,title.string
slotEventOverlapWhether timed events in TimeGrid view visually overlap.boolean

Current Calendar Date Properties

NameDescriptionProperty Type
dateAn ISO 8601 string (YYYY-MM-DD) of the current displayed date. Writable when dateIsReadOnly is false.string
dateIsReadOnlyWhen false, writing to date changes the displayed date.boolean
weekThe ISO week number of the year (readonly).number
displayDateStartThe first visible date on the display. In month view this may not be the first of the month (readonly).string
displayDateEndThe last visible date on the display. This value is exclusive (readonly).string
currentDateStartThe first date of the range the view represents (readonly).string
currentDateEndThe last date of the range the view represents. This value is exclusive (readonly).string
titleThe title string currently generated by the calendar (readonly).string

Date and Time Display Properties

NameDescriptionProperty Type
firstDayThe first day of the week in day grid views. 0 = Sunday, 1 = Monday, etc.number
minTimeThe earliest time displayed in time grid views. Format: HH:mm:ss. Default is 00:00:00.string
maxTimeThe latest time displayed in time grid views. Format: HH:mm:ss. Default is 24:00:00.string
navLinksWhether to make parts of the calendar (e.g., date numbers) into links that navigate to related views.boolean
weekNumbersWhether to display week numbers when possible.boolean
useISOWeekCalcWhether to use ISO week numbers rather than localized week numbers.boolean
weekLabelThe label displayed before the week number. Default is W.string
nowIndicatorWhether to show a line indicating the current time on time grid views.boolean
slotDurationThe duration of each time slot in time grid views. Default is 00:30:00.string
slotLabelIntervalThe frequency at which time slot labels are shown. Useful when slotDuration is small but you only want labels every hour.string
expandRowsWhether rows expand to fill the full height of the view when they don't naturally fill it.boolean
snapDurationThe time interval at which a dragged event snaps to the time axis. Default is 00:30:00.string
slotLabelFormatThe format of the time labels in time grid views, as a Date Format object. See FullCalendar date formatting.object
allDayTextThe text shown on the all-day slot in time grid views. Default is All day.string
weekendsWhether to display weekends on the calendar.boolean
hiddenDaysAn array of integers representing days to hide. Days are indexed from 0 (Sunday) to 6 (Saturday).array
businessHoursHighlights business hours on the calendar. Can be an empty object {} to disable, or an object/array of objects with daysOfWeek, startTime, and endTime. Example: {"daysOfWeek": [1,2,3,4,5], "startTime": "09:00", "endTime": "17:00"}.object
timeZoneThe time zone of the calendar. Options: local (browser time zone), gateway (pulled from the Perspective session), custom (uses local but allows a custom now), or a time zone identifier string such as America/New_York.string
nowWhen timeZone is set to custom, sets the current time as an ISO formatted date string.string

Toolbar Properties

NameDescriptionProperty Type
headerConfigures the header toolbar with left, center, and right string properties. Each is a comma-separated list of toolbar elements. Set to false to remove the header entirely. Available elements: title, prev, next, prevYear, nextYear, today, or any valid view name. Spaces between commas add gaps between buttons.object or boolean
footerSame structure as header. Configures the footer toolbar. Defaults to false (hidden).object or boolean
buttonsAn object with a key per toolbar button name, each configuring that button's appearance and behavior. See Toolbar Button Properties below. Configurable buttons are: today, prev, next, prevYear, nextYear, dayGridYear, dayGridMonth, dayGridWeek, timeGridWeek, timeGridDay, multiMonthYear, listYear, listMonth, listWeek, listDay.object

Toolbar Button Properties

Each button under toolbar.buttons supports:

NameDescriptionProperty Type
textThe display label for the button.string
hintTooltip text shown on hover.string
classNameA CSS class name to apply to the button. The psc- prefix is applied automatically — enter only the suffix (e.g., enter my-button, not psc-my-button).string
isPrimaryWhen true, renders the button with primary styling.boolean
displayControls how the button content is rendered. Options: auto, icon, text, icon-text, text-icon.string

Popover Properties

NameDescriptionProperty Type
dayMaxEventsIn dayGrid views, the maximum number of events to show per day before a "+more" link appears. Set to true to limit based on cell height.number or boolean
eventMaxStackIn timeGrid views, the maximum number of events that stack left-to-right before overflow is hidden.number
dayPopoverFormatThe format of the date displayed in the "+more" popover, as a Date Format object.object
moreLinkContentThe content of the "+more" link. Default is + more.string
moreLinkClickThe action taken when the "+more" link is clicked. Options: popover, week, day, or any valid view name.string

View Properties

NameDescriptionProperty Type
day.dayHeaderFormatDate Format object for column headers in day views.object
day.titleFormatDate Format object for the view title in day views.object
week.dayHeaderFormatDate Format object for column headers in week views.object
week.titleFormatDate Format object for the view title in week views.object
month.dayHeaderFormatDate Format object for column headers in month views.object
month.titleFormatDate Format object for the view title in month views.object
month.fixedWeekCountWhen true, every month view shows the same number of weeks regardless of how many days the month has.boolean
month.showNonCurrentDatesWhen true, displays dates from the previous and next months that fill out the grid.boolean
dayGrid.dayHeadersWhether to show the column header row in day grid views.boolean
dayGrid.eventTimeFormatDate Format object for the event time display in day grid views.object
timeGrid.dayHeadersWhether to show the column header row in time grid views.boolean
timeGrid.allDaySlotWhether to show the all-day slot at the top of time grid views.boolean
timeGrid.eventTimeFormatDate Format object for the event time display in time grid views.object
list.listDayFormatDate Format object for the day label on the left side of list view day headers. Set to false to hide.object or boolean
list.listDaySideFormatDate Format object for the day label on the right side of list view day headers. Set to false to hide.object or boolean
list.noEventsContentMessage displayed when there are no events to show in the current list view range. Default is No events to display.string
list.eventTimeFormatDate Format object for the event time display in list views.object
multiMonth.multiMonthMaxColumnsThe maximum number of month columns in the multi-month year view. Default is 3.number
multiMonth.singleMonthMinWidthThe minimum pixel width of each month in the multi-month view before columns are reduced. Default is 350.number
multiMonth.singleMonthTitleFormatDate Format object for the title of each individual month in the multi-month view.object

Theme Properties

The theme property controls the visual appearance of the calendar through border options, a color palette, and CSS class slots.

theme.borders

NameDescriptionProperty Type
borderlessTopRemoves the top border of the calendar.boolean
borderlessBottomRemoves the bottom border of the calendar.boolean
borderlessXRemoves the left and right borders of the calendar.boolean

theme.palette

Controls the color system for the calendar. Individual event colors set via the event's color and contrastColor properties take precedence over these defaults.

NameDescriptionProperty Type
primaryThe default background and border color for events. Default is #3788d8.color
primaryForegroundThe default text color for events. Default is #fff.color
content.backgroundEventThe color used for background-display events. Default is #22c55e.color
content.backgroundEventOpacityThe opacity of background events. Default is 15%.string
content.highlightThe highlight color used when dates are selected. Default is #cffafe66.color
content.todayThe highlight color for the current date cell. Default is #facc1526.color
content.nowThe color of the now indicator line in time grid views. Default is #ef4444.color
button.colorThe background color of toolbar buttons.color
button.borderThe border color of toolbar buttons.color
button.strongThe background color of active/pressed toolbar buttons.color
button.strongBorderThe border color of active/pressed toolbar buttons.color
button.outlineThe outline color used for button focus states.color
button.foregroundThe text color of toolbar buttons. Default is #fff.color
neutral.backgroundThe calendar background color. Default is #ffffff.color
neutral.foregroundThe primary text color. Default is #030712.color
neutral.borderThe color of grid lines and dividers. Default is #ddd.color
dark.backgroundBackground color when the calendar is in dark mode. Default is #030712.color
dark.foregroundText color in dark mode. Default is #fff.color
dark.borderGrid line color in dark mode. Default is #1f2937.color

theme.classes

Named CSS class slots for applying Perspective style classes to specific parts of the calendar. Enter the style class name without the psc- prefix — it is applied automatically. For example, to apply a style class defined as .psc-my-title, enter my-title.

NameDescription
toolbarTitleApplied to the toolbar title element.
navLinkApplied to navigation links (e.g., day numbers in month view when navLinks is enabled).
eventClassApplied to the outer wrapper of each event.
eventInnerClassApplied to the inner content element of each event.
listItemEventClassApplied to the outer wrapper of each event in list views.
listItemEventInnerClassApplied to the inner content element of each event in list views.

Locale Settings

NameDescriptionProperty Type
localeA language code that changes the calendar's displayed text and date formats. Default is en.string
dirText direction. ltr (default), rtl, or auto. Use rtl for right-to-left languages such as Arabic and Hebrew.string

Component Events

onDateClick

Triggered when a date or time block is clicked on the calendar.

PropertyTypeDescription
event.dateobjectA date object containing the date and time of the block clicked.
event.dateStrstringAn ISO 8601 formatted string representing the block clicked.
event.buttonInfo.altKeybooleanWhether the Alt key was held when the event fired.
event.buttonInfo.shiftKeybooleanWhether the Shift key was held when the event fired.

onEventClick

Triggered when an event on the calendar is clicked.

PropertyTypeDescription
event.idstringThe id of the event.
event.titlestringThe title of the event.
event.startstringThe start of the event.
event.endstringThe end of the event.
event.allDayboolWhether the event spans full days.
event.buttonInfo.altKeybooleanWhether the Alt key was held when the event fired.
event.buttonInfo.shiftKeybooleanWhether the Shift key was held when the event fired.

onEventDropped

Triggered when an event is moved by dragging. Dates are returned as YYYY-MM-DD HH:mm:ss.

PropertyTypeDescription
event.idstringThe id of the event. Returns an empty string if not supplied.
event.startDatestringThe new start date of the event.
event.startTimestringThe new start time as HH:mm:ss.
event.endDatestringThe new end date of the event.
event.endTimestringThe new end time as HH:mm:ss.
event.allDayboolWhether the event spans full days.

onEventResized

Triggered when an event is resized and the final size differs from the original. Dates are returned as YYYY-MM-DD HH:mm:ss.

PropertyTypeDescription
event.idstringThe id of the event. Returns an empty string if not supplied.
event.startDatestringThe start date of the event.
event.startTimestringThe start time as HH:mm:ss.
event.endDatestringThe end date of the event.
event.endTimestringThe end time as HH:mm:ss.
event.allDayboolWhether the event spans full days.

onSelectionMade

Triggered when selectable is true and a range of dates has been selected.

PropertyTypeDescription
event.selectStartobjectThe start of the selection.
event.selectEndobjectThe end of the selection.
event.buttonInfo.altKeybooleanWhether the Alt key was held when the event fired.
event.buttonInfo.shiftKeybooleanWhether the Shift key was held when the event fired.

onEventCreated

Triggered when the built-in Create Event Popup is submitted. Dates are returned as YYYY-MM-DD HH:mm:ss.

PropertyTypeDescription
event.titlestringThe title entered for the new event.
event.startDatestringThe start date of the new event.
event.startTimestringThe start time as HH:mm:ss.
event.endDatestringThe end date of the new event.
event.endTimestringThe end time as HH:mm:ss.
event.eventColorstringThe event color as a hex code.
event.eventTextColorstringThe event text color as a hex code.
event.allDayboolWhether the event spans full days.

onEventEdited

Triggered when the built-in Event Popup's edit mode has been submitted. Dates are returned as YYYY-MM-DD HH:mm:ss.

PropertyTypeDescription
event.titlestringThe updated title of the event.
event.startDatestringThe updated start date.
event.startTimestringThe updated start time as HH:mm:ss.
event.endDatestringThe updated end date.
event.endTimestringThe updated end time as HH:mm:ss.
event.eventColorstringThe event color as a hex code.
event.eventTextColorstringThe event text color as a hex code.
event.allDayboolWhether the event spans full days.

onEventDeleted

Triggered when the delete button is pressed in the built-in Event Popup.

PropertyTypeDescription
event.idstringThe id of the event to delete. Returns an empty string if not supplied.

onEventReceived

Triggered when an event is dragged from an External Event Box and dropped onto the calendar.

PropertyTypeDescription
event.titlestringThe title of the received event.
event.startDatestringThe start date of the event.
event.startTimestringThe start time of the event.
event.endDatestringThe end date of the event.
event.endTimestringThe end time of the event.
event.allDaybooleanWhether the event is an all-day event.
event.eventColorstringThe background and border color of the event.
event.eventContrastColorstringThe text color of the event.
event.extendedPropsstringAny additional custom properties on the event.

onDatesRender

Triggered whenever the calendar's visible date range changes (e.g., navigating to a different month or switching views).

PropertyTypeDescription
event.activeStartstringThe first visible date. In month view this is often before the 1st of the month.
event.activeEndstringThe last visible date. This value is exclusive.
event.currentStartstringThe first date of the period the view represents (disregards hidden days).
event.currentEndstringThe last date of the period the view represents. This value is exclusive.

onWindowResize

Triggered when the calendar is re-rendered following a window resize.

PropertyTypeDescription
event.viewstringThe current FullCalendar view object.

Component Images

Light Mode

Calendar light mode

Dark Mode

Calendar dark mode