Scheduler
Scheduler is a free event calendar with month, week, day and agenda views. Events are moved and resized by drag and drop or with the keyboard, and the visible range can be loaded lazily. It has no calendar library dependency.
Import #
import { Scheduler } from '@exhaustive-ui/core/scheduler';Basic #
Scheduler displays the events of a month by default. An event has an id, a title, a start date and an optional end, exclusive, which defaults to one hour later. Set allDay for events that last whole days, and color to give an event its own background: the text turns dark or light by itself to stay readable. A cell shows up to maxEventsPerDay events, 3 by default, and a "+N more" button opens the full list of the day. The dates are plain JavaScript dates, without any calendar library.
Week and Day #
The view is month, week, day or agenda, and it is two-way bindable like the visible date. The view switcher of the header offers the views input, in its order. The week and day views are time grids: timed events are placed by their hours and the overlapping ones sit side by side, while all-day events and events of 24 hours or more go to the all-day row. slotDuration sets the length of a slot in minutes, 30 by default, dayStartHour and dayEndHour the visible hours, the events outside them being listed by a button on the top or bottom edge of the day, and a red line marks the current time unless nowIndicator is false. showWeekends hides Saturdays and Sundays. The agenda lists the events of the next agendaDays days, grouped by day.
Under the breakpoint width, 640px by default, the month and week views are replaced by the narrowView, the agenda by default; set it to null to keep the view on small screens.
Drag and Resize #
With editable, events are moved by drag and drop, between days and slots, and resized from their bottom edge in the week and day views. The pointer snaps to the slots and the time grid scrolls when the pointer nears its edges. On touch screens, a long press picks the event up, so that the page still scrolls. An event can opt out with its own editable property. Escape cancels a drag.
The component never changes the events: onEventChange gives the event, its new start and end, and the old ones, and the application updates its array, after asking the server for example. With selectable, dragging across empty days or slots emits onRangeSelect, which the demo below uses to create an event.
Lazy Loading #
onViewChange is emitted once at start, then each time the view or the visible range changes, with the view, the first visible day as start and the exclusive end of the range. Use it to load only the events of the range from the server. The demo below simulates a request of 400 milliseconds.
Loading…
Template #
The event template replaces the content of an event and receives the event, the view, the formatted timeText and whether it is displayed as an all-day chip. It is rendered inside the button of the event, so it must not contain interactive elements. The header template replaces the toolbar and receives the title, the view, the range and the today, prev, next and changeView functions.
Locale #
Dates and times are formatted with Intl.DateTimeFormat in the locale, which defaults to the LOCALE_ID of the application; hour12 forces a 12 or 24-hour clock. firstDayOfWeek, from 0 for Sunday to 6 for Saturday, defaults to the firstDayOfWeek of the translation configuration, and the Today button to its today text. Every other text, the view names and the screen reader messages included, can be replaced through labels.
Like any JavaScript date, the dates are read and displayed in the time zone of the browser: convert the dates of another time zone before passing them. The time grid follows the clock, so on the days of a daylight saving time change the events stay on their hour lines, and a day is always one calendar day when navigating or moving an event.
The translation configuration sets the first day of the week and the Today text for every Scheduler, DatePicker included.
providers: [
provideExhaustive({
translation: { firstDayOfWeek: 1, today: "Aujourd'hui" }
})
]Accessibility #
Screen Reader
The month view is an ARIA grid labelled by the title, with a columnheader per weekday and a gridcell per day. A cell is named by its full date and its number of events, the current date has aria-current="date" and the focused or selected days aria-selected. The agenda is a group labelled by the title, so several schedulers on a page do not add landmarks. In the week and day views, each day column is a group labelled by its column header and each slot a button named by its date and hours, such as "Thursday, 3 December 2026, 10:00 – 10:30". Events are buttons named by their title and time, "Review, Thu 3 Dec 10:00 – 11:00", and editable events are described by how to move them with the keyboard. The "+N more" button names the number of hidden events and their day, and opens a dialog that lists them all. A polite live region announces the new range after a navigation, "December 2026" or "Week of 29 Nov 2026", and every moved or resized event. Set ariaLabel to make the component a labelled region.
<p-scheduler ariaLabel="Team calendar" [events]="events" editable selectable />Keyboard Support
The month grid and the time grid each have a single tab stop, on the focused day or slot, followed by the events.
| Key | Function |
|---|---|
| tab | Moves the focus to the toolbar, the focused day or slot, then to each event. |
| left arrow / right arrow | On a day or a slot, moves the focus to the previous or next day, changing the range at its edges. On an event, moves the focus to the previous or next event. |
| up arrow / down arrow | Moves the focus one week up or down in the month view, one slot in the week and day views, and to the previous or next event on an event, in the agenda or in the popover. |
| home / end | Moves the focus to the first or last day of the week, or to the first or last slot of the day. |
| page up / page down | Moves the focus to the same day of the previous or next month, with shift of the previous or next year. In the time grid, moves the focus to the same slot of the previous or next week in the week view, and of the previous or next day in the day view. |
| enter / space | On a day or a slot, emits onDateClick or onSlotClick, or onRangeSelect when a range is selected. On an event, emits onEventClick. On the "+N more" button, opens the list of the events of the day. |
| shift + arrow | With selectable, extends the selected range of days or slots from the focused one. |
| alt + arrow | With editable, moves the focused event by one day with left and right, and by one slot in the time grid or one week in the month view with up and down. |
| alt + shift + up arrow / down arrow | With editable, makes the focused event of the time grid one slot shorter or longer. |
| escape | Clears the selected range, cancels a drag, returns from an event to its day or slot, and closes the popover. |
Every drag and drop has a keyboard equivalent, so that moving, resizing and selecting do not need a pointer.