OGE logoOGE

Scheduler API

Complete API reference for @oge-ui/scheduler. The layout kernel — view-model builders, the transitive-overlap column layout, lane packing, gesture math and the RFC 5545 RRULE-subset parser — is pure TypeScript in @oge-ui/scheduler-engine, shared with the React scheduler; live demos are on the overview page.

Properties Methods Events Types

OgeScheduler

oge-scheduler

Properties 31

Data

Name Type DefaultDescription
dataSourcereadonly T[] | DataSource<T> | nullnullAppointment items: a plain array (copied into an internal working set — the input is never mutated) or any @oge-ui/core DataSource, whose insert/update/remove are used for CRUD when present.
keyExprstring | ((item: T) => unknown)'id'Key field or selector; items without a resolvable key fall back to their index.
textExpr / startDateExpr / endDateExpr / allDayExpr / colorExpr / locationExpr / descriptionExpr / disabledExprstring | ((item: T) => unknown)'text' / 'startDate' / …Field mapping: names (dotted paths reach nested objects) or getter functions. String dates parse as local wall time and write back in the same storage shape.
recurrenceRuleExpr / recurrenceExceptionExprstring | ((item: T) => unknown)'recurrenceRule' / 'recurrenceException'Recurrence fields: rules in the documented RFC 5545 subset expand into occurrence instances in every view; exceptions are comma-separated EXDATE stamps.
reminderExprstring | ((item: T) => unknown)'reminder'Minutes before the start a reminder fires (see reminderTriggered) — OGE extra (Outlook parity).
resourcesreadonly OgeSchedulerResource[][]Resource kinds ({ fieldExpr, items, label?, useColorAsDefault? }): editor select fields, default appointment colors and timeline rows.
groupsreadonly string[][]Resource field grouping the views (first entry): timeline rows, and day/week columns split per resource — grouped cells prefill the resource on create, and drags across subcolumns/rows reassign it.
recurrenceEditMode'dialog' | 'occurrence' | 'series''dialog'How edits to a recurring occurrence apply: ask per action, always detach the occurrence (EXDATE + standalone copy), or always change the series.

Date & views

Name Type DefaultDescription
currentDateDatenew Date()Anchor date of the visible period. Two-way ([(currentDate)]); writes clamp into [min, max].
currentView'day' | 'week' | 'workWeek' | 'month' | 'agenda' | 'timelineDay' | 'timelineWeek' | 'year''week'The active view. Two-way ([(currentView)]).
viewsreadonly (OgeSchedulerView | OgeSchedulerViewOptions)[]['day', 'week', 'month']View-switcher entries; option objects override name, dayStartHour, dayEndHour and cellDuration per view.
adaptiveViewboolean | { breakpoint?: number; view?: OgeSchedulerView }falseSwitches the visible view to view (agenda) when the scheduler's own width — a ResizeObserver, never the window — drops below breakpoint (600px), and back to the previous view when it grows again. The switch writes currentView like a user pick, on crossings only, so the switcher keeps working at any width and a view picked while narrow wins.
min / maxDate | undefined—Navigable date bounds: navigation buttons disable at the edges and every date write clamps.
firstDayOfWeeknumber | undefined—First day of week (0 = Sunday); undefined resolves from the locale via Intl.Locale.weekInfo.
weekendDaysreadonly number[] | undefined—Weekend days (0 = Sunday … 6 = Saturday) the day/week, month and timeline views shade and the workWeek view drops. undefined resolves from the locale via Intl.Locale#getWeekInfo() (Friday + Saturday in he-IL), falling back to Saturday + Sunday.
hiddenWeekDaysreadonly number[] | undefined—Weekdays removed from the week views; the workWeek view always drops the weekend on top.
dayStartHour / dayEndHour / cellDurationnumber0 / 24 / 30Visible hour window and slot raster (minutes) of the time grids.
agendaDurationnumber7Days the agenda view lists from the anchor date.
scrollTimenumber | undefined—Initial scroll position of the day/week body in hours (fractions allowed, e.g. 8.5); re-applied on view/period changes.

Behavior

Name Type DefaultDescription
allowAdding / allowUpdating / allowDeleting / allowDragging / allowResizingbooleantruePer-capability editing gates.
readOnlybooleanfalseDisplay-only shorthand: overrides every allow* flag at once and hides the editing affordances. The day/week and month grids then carry aria-readonly="true" (also when every allow* flag is off).
snapDurationnumber | undefined—Drag/resize snap raster in minutes; defaults to cellDuration.
workHoursOgeSchedulerWorkHours | nullnullWorking-hours emphasis: cells outside { start, end, days? } get the off-hours shading.
showAddButtonbooleantrueShows the toolbar "new appointment" button (Outlook parity) — creation without double-click; hidden while readOnly or allowAdding=false.
showAllDayPanelbooleantrueShows the all-day strip in the day/week views.
showCurrentTimeIndicatorbooleantrueThe accent now-line in today's column.
shadeUntilCurrentTimebooleanfalseDims today's column above the now-line.
maxAppointmentsPerCellnumber | 'auto''auto'Month-view lane budget per cell; the overflow folds into a "+N more" button that drills into the day view.
localestring | undefined—BCP 47 locale for every Intl format; defaults to the browser locale.
messagesPartial<OgeSchedulerMessages>{}Per-instance message overrides, merged over the DI config per top-level block.
dateNavigatorText(start: Date, end: Date, view: OgeSchedulerView) => string—Custom period-title formatter for the toolbar.

Methods 11

Name Type Description
addAppointment(appointmentData)voidInserts programmatically through the same cancelable appointmentAdding pipeline as interactive creation.
updateAppointment(appointmentData, patch)voidApplies a patch through the guarded update pipeline.
deleteAppointment(appointmentData)voidDeletes through the guarded delete pipeline.
showAppointmentPopup(appointmentData?, createNew?)voidOpens the editing form — prefilled create form with createNew/no data, edit form otherwise (dx parity: the method opens the form).
hideAppointmentPopup()voidCloses the editor dialog and the summary popup.
scrollToTime(hours, minutes?)voidScrolls the day/week body to the given time of day.
scrollTo(date)voidNavigates to date and scrolls to its time of day.
getStartViewDate() / getEndViewDate()DateFirst moment / exclusive end of the visible period.
getDataSource()readonly T[] | DataSource<T> | nullThe bound data source, as given.
focus()voidFocuses the active view's grid (roving cell).
goToday() / navigate(direction)voidToolbar equivalents: jump to today / step one period (respects min/max).

Events 9

Editing (cancelable pipeline)

Name Type Description
appointmentAdding / appointmentUpdating / appointmentDeletingOgeSchedulerAppointment*ingEvent<T>Cancelable pre-events — set cancel = true to veto before the store changes.
appointmentAdded / appointmentUpdated / appointmentDeletedOgeSchedulerAppointment*edEvent<T>Fired only for applied changes — persist from these when binding plain arrays.
editorShowingOgeSchedulerEditorShowingEvent<T>Cancelable, before the editor opens; replace formItems to customize the form (dx onAppointmentFormOpening parity).

Reminders

Name Type Description
reminderTriggeredOgeSchedulerReminderEvent<T>Fires once per occurrence when start − reminder minutes is reached (checked about every 30 s while mounted) — OGE extra.

Interaction

Name Type Description
appointmentClick / appointmentDblClickOgeSchedulerAppointmentClickEvent<T>Chip clicks; single click also opens the popup, double click the editor.
cellClick / cellDblClickOgeSchedulerCellClickEventEmpty-cell clicks; double click also opens the prefilled create editor.
appointmentContextMenu / cellContextMenuOgeSchedulerAppointmentClickEvent<T> / OgeSchedulerCellClickEventRight-clicks with full payloads. A built-in context menu also opens (chip: edit/delete through the guarded pipelines incl. recurrence scope; cell: new appointment prefilled at that slot — labels in messages.menu); listen to these events to add your own entries alongside it.
rangeSelectedOgeSchedulerRangeSelectedEventA drag-to-create cell-range selection landed; the prefilled create editor opens next.
currentDateChange / currentViewChangeDate / OgeSchedulerViewThe two-way model outputs.

Types 6

Name Type Description
OgeSchedulerAppointment<T>interfaceThe normalized appointment: key, source (the original item), text, startDate/endDate, allDay, color, description, recurrence fields and disabled.
OgeSchedulerViewOptionsinterfacePer-view overrides: type, name, dayStartHour, dayEndHour, cellDuration.
OgeSchedulerWorkHoursinterface{ start, end, days? } — the emphasized working hours.
[ogeAppointmentTemplate]structural directiveReplaces the chip content; context { $implicit: OgeSchedulerAppointment<T>, view }.
OgeSchedulerCellTemplatestructural directive [ogeCellTemplate]OGE extra — custom empty-cell content; context { $implicit: Date, view, allDay }.
OgeDateHeaderTemplatestructural directive [ogeDateHeaderTemplate]OGE extra — custom date-header content; context { $implicit: Date, view }.

Configuration

Properties 3

Name Type DefaultDescription
provideOgeSchedulerConfig(config)Provider—Configures every scheduler below the provider; shallow merge per top-level key (a partial messages replaces whole nested blocks).
messagesOgeSchedulerMessages—Every user-facing string, aria labels included: toolbar (labels, view names, date-navigator), popup, editor (titles, field labels, validation), grid (aria templates with {token} placeholders, "+{count} more") and announcements (live-region templates).
minAppointmentMinutesnumber15Minimum rendered chip height in minutes — zero-length reminders stay clickable.

Notes

  • Dates are plain local Dates throughout (Intl-only house rule — no date library, no adapter, no timezone database). RRULE stamps without a suffix are local wall time; …Z stamps are UTC and convert to the matching local instant. The supported RFC 5545 subset is FREQ DAILY/WEEKLY/MONTHLY/YEARLY, INTERVAL, COUNT ⊕ UNTIL, BYDAY, BYMONTHDAY, BYMONTH, BYHOUR, BYMINUTE, BYSETPOS and WKST, plus DTSTART/RDATE/EXDATE lines when the rule field holds an iCalendar property block. TZID, BYYEARDAY, BYWEEKNO, BYSECOND and EXRULE reject the whole rule rather than truncating it.
  • No WAI-ARIA APG scheduler pattern exists. The widget composes the calendar-grid pattern: the view body is a role="grid" whose first row holds role="columnheader" cells (the full date, plus the resource when grouped; weekday names in the month view), and one roving-tabindex cell (arrows, Home/End, Enter/Space creates) that is also the aria-selected cell — selection follows focus, and a live drag-to-create range selects the slots it covers. A read-only scheduler sets aria-readonly on the grid. The appointment chips form a second tab stop of role="button" elements — Left/Right cycles chronologically, Enter opens the popup, Delete deletes, and Ctrl+Arrow moves / Ctrl+Shift+Up/Down resizes as the keyboard equivalent of drag, announced through a polite live region.
  • Binding a plain array never mutates it — edits land in an internal working set and the past-tense events carry the data to persist. A DataSource with insert/update/ remove is written through and reloaded instead.