Skip to main content
Version: 1.0.8

IPlannerProps

@spartanfx/react v1.0.8


@spartanfx/react / IPlannerProps

Interface: IPlannerProps

Props for the Planner component.

Remarks

Raw items are converted into planner items based on the provided schema. View state changes may be captured via the provided callbacks.

Properties

PropertyTypeDescription
allowAddNew?booleanWhether adding new items is enabled
allowDragDrop?booleanWhether drag-and-drop is enabled.
allowPeriodCountSelection?booleanWhether to show the period count selector in the UI.
allowViewByWeek?booleanWhether viewing by week is permitted.
allowViewByYear?booleanWhether viewing by year is permitted.
appearance?stringAppearance mode (light/dark) - AppearanceMode enum. Defaults to light.
categories?string[]Explicit list of category (group) strings to display as rows. When provided, one row per entry is rendered in exactly this order, even if no items exist for a given category. Extra categories found in items but not in this array are appended after the explicit list. When omitted, categories are derived from items at render time (current behavior).
className?stringCustom CSS class on the container.
colorIndex?numberIndex for selecting a predefined color palette.
colorMapping?ColorMappingOptional custom color mapping.
containerHeight?numberHeight of the planner container.
containerWidth?numberWidth of the planner container.
currentMonth?numberCurrent month in view.
currentWeek?numberCurrent week in view.
currentYear?numberCurrent year in view.
elementClassName?stringCSS class applied to each item element.
grouped?booleanWhether items should be displayed in grouped mode.
groupIconMapping?GroupIconMappingOptional custom group icon mapping per group.
itemsRecord<string, unknown>[]Raw item list before schema transformation.
legendProps?Partial<ILegendProps>Additional props passed to the legend component.
loading?booleanUpdate this prop to show the embbedded loading animation of the Planner
maxPeriodCount?PeriodCountMax period count to show in the selector in the UI.
nonWorkingDates?Date[]Specific dates that should be styled as non-working days. Independent of nonWorkingWeekdays — both can be used together. A day is non-working if it matches either rule. Time components are ignored when comparing. Defaults to an empty array when omitted.
nonWorkingWeekdays?number[]Recurring weekday numbers that should be styled as non-working days. Uses JavaScript Date.getDay() numbering: 0 = Sunday, 6 = Saturday. Defaults to [0, 6] (Saturday and Sunday) when omitted.
onChangeCurrentMonth?(month) => voidMonth change callback.
onChangeCurrentWeek?(week) => voidWeek change callback.
onChangeCurrentYear?(year) => voidYear change callback.
onChangePeriodCount?(count) => voidPeriod count change callback.
onChangeViewBy?(viewBy) => voidView mode change callback.
onDragClass?stringCSS class applied during drag operations.
onPlannerDatesChanged?(newStartDate, newEndDate) => voidCallback for planner dates changed
onRenderGroup?(groupStr) => ElementCustom renderer to render the group element.
onRenderItem?(item, props) => ReactNodeOptional callback to render a custom inner element for each planner item. The ElementWrapper behaviour (drag, resize, click, context menu) is preserved.
optionsIPlannerOptionsGlobal planner configuration and event hooks.
periodCount?PeriodCountNumber of periods to display (1 or 2).
schemaIPlannerSchemaMapping definition from raw data to planner item.
showLegend?booleanWhether the color legend should be displayed.
style?anyInline styles for the container.
viewBy?ViewByCurrent view mode.