Scheduler - Event UI
Replace timed, all-day, month, timeline, and agenda event surfaces.
#Choose a Surface
Pick the smallest event surface that matches the visual change.
event-shell="none"lets a custom component paint the card background, border, padding, and text. Scheduler keeps geometry, hit targets, focus, selection, drag, resize, and overlay anchors.Scheduler.Eventis the broad fallback for every event surface that does not declare a scoped outlet.Scheduler.TimeGridEventis for dense timed cards in day, week, work-week, and resource time grids.Scheduler.AllDayEventis for compact all-day row content with spanning and overflow behavior.Scheduler.MonthEventis for month chips or short cards inside date-cell overflow.Scheduler.TimelineEventis for horizontal bars and resource-aware lane content.Scheduler.AgendaEventis for list-style agenda rows with grouped date and resource labels.
Use Style when the event structure is right and only color, border, focus, density, or category treatment needs to change. Replace the event component when the content model changes, such as adding owner, room, status, resource, category, or handoff metadata inside the card.
#Small Override
Start with one scoped event outlet. The event owner still renders the interactive root, then your component draws the visible card.
<Scheduler.Root event-shell="none">
<Scheduler.Content>
<Scheduler.Week>
<Scheduler.TimeGridEvent>
<WorkCard />
</Scheduler.TimeGridEvent>
<Scheduler.AllDayEvent>
<WorkCard compact />
</Scheduler.AllDayEvent>
</Scheduler.Week>
</Scheduler.Content>
</Scheduler.Root>The component can use the public event context instead of a long prop list.
<script setup lang="ts">
import { computed } from 'vue';
import { useSchedulerEventContext } from '@primeui/vue-scheduler';
const context = useSchedulerEventContext();
const owner = computed(() => context.value.event.metadata?.owner ?? 'Unassigned');
</script>
<template>
<article class="work-order-card" :data-state="context.isSelected ? 'selected' : undefined">
<strong>{{ context.title }}</strong>
<span>{{ context.timeText }}</span>
<small>{{ owner }}</small>
</article>
</template>#Context
useSchedulerEventContext() exposes the fields that event cards usually need.
| Field | Use |
|---|---|
event | Read id, resource id, category id, color, text color, border color, and custom metadata. |
title | Display the normalized title without reaching back into the raw record. |
timeText | Show the Scheduler-formatted time range for timed, all-day, month, and timeline cards. |
formattedTime / formattedDate | Use agenda-specific labels when rendering Scheduler.AgendaEvent. |
resource | Display resource names or status for resource-aware timelines and agenda rows. |
surface / view | Branch inside a reusable card only when the same component must adapt to multiple outlets. |
isSelected, isDragging, isResizing | Add visual state without replacing Scheduler interaction behavior. |
accentColor, textColor, borderColor | Reuse category or event color decisions inside custom chrome. |
Always keep title and time visible in dense timed cards. Short events may have only one or two text lines, so move secondary metadata to a small caption or tooltip instead of making the card taller than the available slot.
#Event Cards
Replace timed and all-day event surfaces with application-owned cards. A reusable event card component can read the public event context and display surface, title, time, owner, accent, and selection state.
#Event Surfaces
Scheduler.TimeGridEvent: Timed events in day, week, work week, and resource time grids. Keep title and time at the top because overlapping layouts depend on quick scanning.Scheduler.AllDayEvent: All-day rows in time-grid views. Use this for spanning all-day events and overflow rows.Scheduler.MonthEvent: Month cells. Use this when chips or short cards need segment and continuation metadata.Scheduler.TimelineEvent: Timeline and resource timeline lanes. Use this for horizontally scrolling bars and long resource-aware content.Scheduler.AgendaEvent: Agenda rows. Use this when rows need grouped date and resource display fields.Scheduler.Event: Broad fallback. Use this when one card is acceptable for every surface that does not declare a scoped outlet.
#Advanced Example
Customize each event surface with scoped outlet cards. The Scheduler event owner still handles positioning, drag, resize, selection, focus, and overlay triggers.
#Checklist
- Set
event-shell="none"when the custom card owns visible chrome. - Set
agenda-event-shell="none"when replacingScheduler.AgendaEvent. - Preserve a readable title and time on every surface, including all-day and agenda rows.
- Keep drag ghost, resize, selected, focused, and overlay-trigger states visible.
- Use available height carefully. Timed events can be shorter than the card content, and month chips share a date cell with other events.
- Keep all-day and spanning events compact so continuation segments do not look like unrelated records.
- Prefer Style and category colors when the default event layout already carries the right content.
#API
Use semantic event outlets, useSchedulerEventContext, event-shell, agenda-event-shell, and event surface fields such as color, textColor, borderColor, categoryId, and metadata. See Slots and Contexts for the full payload list and Data Attributes for state selectors.