Components · Display
ScheduleCalendar
Month, week, and day calendar views with event rendering, drag-to-create, and merge-aware overlays for showing consolidated activities.
Key points
- Three views: month, week, day. View is controlled via the view prop.
- Reads events directly from the engine via the active provider — no manual fetching needed
- Supports drag-to-create when enableDragCreate is set; fires onSlotCreate with the dragged range
- Custom event rendering via renderEvent for non-default visuals
Import
import { ScheduleCalendar } from '@flexischeduler/scheduling-components';ScheduleCalendar is the heaviest component in the library — it bundles the calendar grid, event layout engine, and drag interaction handlers. If you import it, expect ~45kb gzipped. Other components are much smaller.
Basic usage
Render a week view for a single staff member, navigating to an event detail page on click:
<ScheduleCalendar
view="week"
entityId="ent_staff_a8f4"
startDate={new Date('2026-05-01')}
onEventClick={(event) => navigate(`/events/${event.id}`)}
/>The component fetches events for the entity and date range automatically. Pagination, caching, and refetching on filter change are all handled internally.
Reference
Props
Name
Type
Description
viewrequired
"month" | "week" | "day"Calendar view mode
entityIdstringFilter to events involving this entity. Omit to show all events in the organization.
eventTypestringFilter to a specific event type
startDateDatedefault: today
Anchor date for the displayed range
enableDragCreatebooleandefault: false
Enable drag-to-create slot interaction
showMergedOverlaybooleandefault: true
Visually group events that share merge metadata
renderEvent(event: Event) => ReactNodeCustom render function for event blocks
Events
Event
Payload
Fires when
onEventClick(event: Event) => voidUser clicked an event block
onSlotCreate(slot: { startTime, endTime }) => voidUser dragged to create a slot (requires enableDragCreate)
onViewChange(view: "month" | "week" | "day") => voidUser changed the view mode through the built-in toggle
onDateChange(date: Date) => voidUser navigated to a different date range
Drag to create
Setting enableDragCreate turns the empty grid cells into drag targets. Dragging fires onSlotCreate with the range; typically you’d open an EventEditor prefilled with the dragged times:
<ScheduleCalendar
view="day"
entityId="ent_staff_a8f4"
enableDragCreate
onSlotCreate={(slot) => {
openEventEditor({
startTime: slot.startTime,
endTime: slot.endTime,
primaryEntityId: 'ent_staff_a8f4',
});
}}
/>Custom event rendering
For non-default event visuals (status badges, custom icons, domain-specific labels), pass a renderEvent function. The function receives the full event object:
<ScheduleCalendar
view="week"
entityId="ent_staff_a8f4"
renderEvent={(event) => (
<div className="custom-event-card">
<strong>{event.title}</strong>
<span>{event.eventType}</span>
</div>
)}
/>The custom node is positioned automatically by the layout engine — you don’t need to manage absolute positioning or overlap handling.
Use the merge overlay
showMergedOverlay={false} if your domain doesn’t use merging.