Examples
Basic
To create a simple calendar, just pass in an events array.
Result
Asynchronous data fetching
Set the isFetching
prop to true
to activate the loading overlay.
Result
Responsive overflow handling
The calendar will grow to fill its container. Resize the container below to see the calendar automatically show/hide events based on the available space.
Result
Resize the calendar by dragging the bottom-right corner
Detail popover
Use the onEventClick
and renderPopover
props to bind a popover to events.
The renderPopover function provides an object containing the clickedEvent
, newEvent
(for click & drag event creation) and an onClose
function. Make sure to call the onClose
function on your popover close event to reset the internal calendar state.
Result
Custom header
With the useEventsCalendar
hook, we can manage the calendar state externally and create a custom header element.
Result
Click & drag event creation
To enable click & drag event creation, set enableDragCreation
to true
. You can then use the onEventCreate
callback to handle when the user finishes dragging (for example by opening a popover).
Result
Context menu
Use the renderContextMenu
prop to bind a context menu to events. Right click on an event below to see it in action.
Result
Kitchen sink
Kitchen sink implementation with popover & context menu rendering, click & drag event creation, custom header component and external calendar state management.
Result
On this page