CalendarRow
This is normally used as the "All day events" section of a DayView or WeekView. But it may be used standalone as a regular Widget.
As a standalone widget, it will lack the capabilities of the Calendar class, such as keyboard-based event to event navigation and drag/drop features.
A Widget which displays a single row of calendar cells for a configured range of dates.
Cell rendering can be customized using the dayCellRenderer method.
Event rendering can be customized using the eventRenderer method.
When used inside a Calendar, the all day events row at the top of a DayView or WeekView is a CalendarRow. It can be configured through the allDayEvents config:
const calendar = new Calendar({
modes : {
week : {
allDayEvents : {
// Configure how overflow is handled
overflowClickAction : 'popup',
// Customize the day header
dayHeaderRenderer(domConfig, cellData) {
return `${cellData.date.getDate()} ${cellData.isNonWorking ? '(off)' : ''}`;
}
}
}
}
});
Useful configs
| Config | Description |
|---|---|
| defaultEventRowCount | Max visible event rows before overflow |
| autoHeight | Grow to accommodate all events |
| overflowPopup | Config for the overflow popup |
| overflowClickAction | Action when clicking overflow indicator |
| eventRenderer | Custom renderer for event bars |
See also
- allDayEvents — Config that creates this row in a DayView
- OverflowPopup — Popup shown when events overflow a cell
- DayResourceCalendarRow — Subclass used in resource-grouped views
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
Set this to
falseto not use transition for this Widget as it changes height -
Specify
trueto textually compress day number pairs. For example, compress "11/12" to "11/2". Also whentrue, the daySeparator is trimmed of any whitespace. -
The DateHelper format string for day numbers (e.g., "D" for "9", "10", ...)
-
The separator between day names and numbers. If a single string is provided, it applies to both day names and day numbers. If an array of 2 strings is provided, the [0] element is the separator for day names and [1] element is the separator for day numbers.
-
Either the start hour of the day, or a 24 hour
HH:MMstring denoting the start of the first rendered daily time block. -
The number of events to show to define the height of this widget by default if this widget autoHeight is not defined as
true. The widget may be expanded to accommodate all the events if there are overflowing events. -
When
true, a full week of dates is rendered for a single day range. This should not be applied when thedurationspans multiple days.Has a corresponding runtime fullWeek property.
-
How much extra space in pixels or other DOM units to allow below the event bars to facilitate drag-create gestures.
-
The CSS class to apply to the header element for this view's date.
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of CalendarRow class, or subclass thereof.
-
A callback function which an application may provide to filter out day columns for individual dates.
Has a corresponding dateFilter config.
-
When
true, a full week of dates is rendered for a single day range. This should not be applied when thedurationspans multiple days.Has a corresponding fullWeek config.
-
A Promise which will be in Pending state only when the
minHeightis animating to a new value. -
Identifies an object as an instance of CalendarRow class, or subclass thereof.
Functions
Functions are methods available for calling on the class-
If not autoHeight, this toggles between the collapsed state where it shows the defaultEventRowCount even if more event rows exist, and the expanded state (which is equivalent to autoHeight) where all event rows are shown.