API reference: @salmonui/scheduler
SchedulerViewConfiginterface
import type { SchedulerViewConfig } from '@salmonui/scheduler';interface SchedulerViewConfig<Row = unknown> {
readonly type: SchedulerViewType;
readonly name?: string;
readonly label?: string;
readonly interval?: number;
readonly startHour?: string;
readonly endHour?: string;
readonly workDays?: readonly number[];
readonly showWeekend?: boolean;
readonly readOnly?: boolean;
readonly dateFormat?: Intl.DateTimeFormatOptions;
readonly timeScale?: SchedulerTimeScale;
readonly renderEvent?: (ctx: SchedulerEventRenderContext<Row>) => ReactNode;
readonly eventLayout?: SchedulerEventLayout;
readonly monthCount?: number;
readonly firstMonthOfYear?: number;
readonly agendaDayCount?: number;
readonly hideEmptyAgendaDays?: boolean;
readonly orientation?: 'horizontal' | 'vertical';
readonly virtualScroll?: boolean | SchedulerVirtualScroll;
readonly headerRows?: readonly SchedulerHeaderRow[];
readonly renderMonthHeader?: (ctx: SchedulerMonthHeaderContext) => ReactNode;
readonly renderDayHeader?: (ctx: SchedulerDayHeaderContext) => ReactNode;
}
One view entry of views: overrides the top-level prop of the same name for that view.
| Name | Signature | Description |
|---|---|---|
type | readonly type: SchedulerViewType; | |
nameoptional | readonly name?: string; | Name used by |
labeloptional | readonly label?: string; | Button label (default from |
intervaloptional | readonly interval?: number; | Days, weeks, months or years per page (a 3-day view: |
startHouroptional | readonly startHour?: string; | |
endHouroptional | readonly endHour?: string; | |
workDaysoptional | readonly workDays?: readonly number[]; | |
showWeekendoptional | readonly showWeekend?: boolean; | |
readOnlyoptional | readonly readOnly?: boolean; | |
dateFormatoptional | readonly dateFormat?: Intl.DateTimeFormatOptions; | |
timeScaleoptional | readonly timeScale?: SchedulerTimeScale; | |
renderEventoptional | readonly renderEvent?: (ctx: SchedulerEventRenderContext<Row>) => ReactNode; | |
eventLayoutoptional | readonly eventLayout?: SchedulerEventLayout; | |
monthCountoptional | readonly monthCount?: number; | Year views: months per page and the first month. |
firstMonthOfYearoptional | readonly firstMonthOfYear?: number; | |
agendaDayCountoptional | readonly agendaDayCount?: number; | Agenda: days per page. |
hideEmptyAgendaDaysoptional | readonly hideEmptyAgendaDays?: boolean; | Agenda: skip days without events (default true). |
orientationoptional | readonly orientation?: 'horizontal' | 'vertical'; | Timeline Year: months as rows ( |
virtualScrolloptional | readonly virtualScroll?: boolean | SchedulerVirtualScroll; | Virtual scrolling of timeline resource rows or of the agenda days. |
headerRowsoptional | readonly headerRows?: readonly SchedulerHeaderRow[]; | Timeline header rows. |
renderMonthHeaderoptional | readonly renderMonthHeader?: (ctx: SchedulerMonthHeaderContext) => ReactNode; | Year and Timeline Year month and weekday headers. |
renderDayHeaderoptional | readonly renderDayHeader?: (ctx: SchedulerDayHeaderContext) => ReactNode; |