Import
import { NuiScheduler, type NuiSchedulerEvent } from '@needless-ui/angular/scheduler';NuiScheduler
Events in a month, a week, a day or an agenda.
| Name | Type | Default | Description |
|---|---|---|---|
eventsInput | NuiSchedulerEvent<T>[] | [] | The events to show. |
viewTwo-way | 'month' | 'week' | 'day' | 'agenda' | 'week' | The view shown. |
viewsInput | NuiSchedulerView[] | all four | The views people can switch between. |
dateTwo-way | NuiDate | today | The day shown, and where the keyboard is. |
slotMinutesInput | number | 30 | Minutes per row of the time grid, and the step events move by. |
scrollHourInput | number | 8 | The hour the time grid opens at. |
agendaDaysInput | number | 30 | Days the agenda looks ahead. |
editableInput | boolean | false | Events can be moved and resized, by pointer and keyboard. |
selectableInput | boolean | false | Time can be chosen on the grid, to create events. |
firstDayInput | 1 … 7 | The first day of the week, 1 for Monday. By default, the locale’s. | |
headingLevelInput | number | 2 | The title’s heading level; the agenda’s days are one deeper. |
localeInput | string | LOCALE_ID | Formats days and times. |
labelsInput | Partial<NuiSchedulerLabels> | Every text the scheduler shows or announces, to translate. | |
cornersInput | NuiCorners | The shape of its corners: round, squircle, bevel, scoop, notch or square. | |
radiusInput | NuiRadius | How big its corners are: none, small, medium, large or full. | |
densityInput | NuiDensity | How much room it takes: compact, regular or roomy. | |
eventClickOutput | NuiSchedulerEvent<T> | Emits an event clicked, or opened with Enter. | |
eventChangeOutput | { event, start, end } | Emits an event’s new times after a move or a resize. | |
slotSelectOutput | { start, end, allDay } | Emits the time chosen on the grid. | |
rangeChangeOutput | { start, end } | Emits the first and last day shown when they change. |
Customization inputs you leave unset follow the nearest data-nui-* attribute. See the customization guide.
NuiSchedulerEvent
An event. A timed event’s end isn’t included; an all-day event’s end is its last day.
| Name | Type | Default | Description |
|---|---|---|---|
id, titleProperty | string | Its key, and what it shows. | |
start, endProperty | NuiDateTime | NuiDate | Dates and times, or dates for all-day events. | |
allDayProperty | boolean | By default, whether start has no time. | |
toneProperty | 'accent' | 'neutral' | 'success' | 'warning' | 'danger' | 'accent' | Its color. |
editableProperty | boolean | Whether it can be moved, whatever the scheduler says. | |
dataProperty | T | Anything else to keep with it. |
NuiSchedulerEventTemplate
Draws events. The context holds the event and its time as text.