Options
createCalendar(element, options) prend un seul objet d’options. La plupart
peuvent changer ensuite avec calendar.update({ … }) ; les frameworks les
passent en entrées, en props ou dans un objet options.
Chaque option a sa page : ce qu’elle fait, son type et sa valeur par défaut, si elle change à chaud, un exemple en JavaScript, Angular, React et Vue, et une démo en direct. Chaque option a sa page.
Toutes les options
Section intitulée « Toutes les options »Généré à partir des types : le type, et si update() la change.
| Option | Type | En direct |
|---|---|---|
allDaySlot | boolean | Oui |
autoPrint | boolean | Non |
availableSlots | readonly AvailableSlot[] | null | Oui |
businessHours | BusinessHoursInput | Oui |
chooseScope | (request: ScopeRequest) => EditScope | null | Promise<Edi… | Oui |
collapsedGroups | readonly string[] | Oui |
collapsedResources | readonly string[] | Oui |
contextMenu | MenuHook | Oui |
cssLayers | boolean | Non |
customButtons | Readonly<Record<string, CustomButton>> | Oui |
dayMaxLanes | number | 'auto' | null | Oui |
density | 'compact' | 'comfortable' | 'spacious' | Oui |
displayCalendar | string | null | Oui |
displayEventTime | boolean | Oui |
dragEdgeNavigate | boolean | Oui |
droppable | boolean | ((data: unknown) => boolean) | Oui |
editable | boolean | Oui |
eventMaxStack | number | 'auto' | null | Oui |
eventResizableFromStart | boolean | Oui |
eventStyle | 'tinted' | 'solid' | Oui |
events | readonly EventInput[] | Oui |
firstDay | Weekday | Oui |
forget | { readonly olderThan: DurationLike } | null | Oui |
formats | Formats | Oui |
headerItems | Readonly<Record<string, ElementHooks<HeaderItemCtx>>> | Oui |
headerToolbar | HeaderToolbar | false | Oui |
headerViews | readonly string[] | Oui |
hiddenDays | readonly Weekday[] | Oui |
historyLimit | number | Non |
hooks | CalendarHooks | Oui |
initialDate | PlainDate | Oui, sous date |
initialView | string | Oui, sous view |
injectStyles | boolean | Non |
kernel | CalendarKernel | Non |
keyboardUndo | boolean | Oui |
locale | string | Oui |
look | 'styled' | 'none' | Oui |
messages | Partial<DzMessages> | Oui |
motion | MotionAdapter | Oui |
multiMonthMaxColumns | number | Oui |
nowIndicator | boolean | Oui |
nowRefresh | DurationLike | Oui |
onCommandRefused | (result: CommandResult, command: Command) => void | Oui |
onCreateRequest | (request: CreateRequest) => void | Oui |
onDateClick | (click: DateClick) => void | Oui |
onDrop | (drop: DropInfo) => void | Oui |
onEventChange | (change: EventChange) => void | Oui |
onEventClick | (instance: EventInstance) => void | Oui |
onEventLeave | (leave: EventLeave) => void | Oui |
onEventOpen | (instance: EventInstance) => void | Oui |
onEventReceive | (change: EventChange) => void | Oui |
onFollowChange | (following: boolean) => void | Oui |
onProblem | (problem: CalendarProblem) => void | Oui |
onProposalRefused | (proposal: Proposal) => void | Oui |
onResourceProblems | (problems: readonly Problem[]) => void | Oui |
onResourceToggle | (state: { readonly collapsedResources: readonly string[];… | Oui |
onSelect | (selection: Selection) => void | Oui |
onSlotClick | (slot: AvailableSlot) => void | Oui |
onSource | (n: SourceNotice) => void | Non |
onUnselect | () => void | Oui |
resourceGroupField | string | undefined | Oui |
resourceOrder | ResourceOrder | undefined | Oui |
resources | readonly ResourceInput[] | Oui |
rules | Omit<RulesContext, 'displayZone' | 'businessHours'> | Oui |
scheme | 'auto' | 'light' | 'dark' | Oui |
scrollTime | DurationLike | Oui |
secondaryCalendar | string | null | Oui |
selectable | boolean | Oui |
showUnassigned | boolean | Oui |
snapMinutes | number | Oui |
sources | readonly EventSourceSpec[] | Oui |
store | EventStore | Non |
theme | string | Oui |
timeGrid | Omit<TimeGridOptions, 'displayZone' | 'businessHours' | '… | Oui |
timeZone | ZoneId | Oui |
timeline | { readonly slot?: number | 'day'; readonly maxLanes?: num… | Oui |
titleFormat | TitleFormat | Oui, sous formats |
viewOptions | Readonly<Record<string, unknown>> | Oui |
views | Readonly<Record<string, ViewSpec | ViewSettings>> | Non |
virtualizeAbove | number | Non |
weekNumbers | boolean | Oui |
weekends | boolean | Oui |
Les fonctions de rappel — onEventClick, onDateClick, onSelect, onEventChange… — sont des options aussi, et se remplacent avec update().