AgendaView
This is normally used as a mode of a Calendar (as seen in the live demo below) but 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. As seen in this demo:
A Grid which displays an agenda view of the events in an EventStore.
When used as a mode of a Calendar, the configured range is snapped to encapsulate the Calendar's current date.
If configured with an explicit startDate and endDate, the range is not used. When setting the date, the duration of the configured range is preserved, but the range is shifted backwards or forwards in time just enough to bring the passed Date into view.
The AgendaView offers a floating settings button to allow the user to change the range type. This may be disabled by configuring the listRangeMenu as null.
Column renderer
The content of each agenda cell is created by the AgendaColumn's defaultRenderer
To inject content or manipulate the cell's DOM, you may configure the column with a renderer:
modes : {
agenda : {
columns : {
agenda : {
renderer({ cellElement, record : cellData }) {
// Manipulate the cell as we need
cellElement.classList.toggle('is-sunday', cellData.day === 0);
// We need the system-provided cell rendering
return this.defaultRenderer(...arguments);
}
}
}
}
}
Useful configs
| Config | Description |
|---|---|
| range | Time range to display (e.g. 'year', 'month') |
| listRangeMenu | Menu for changing the displayed range |
| columns | Column definitions for the agenda grid |
| eventRenderer | Custom renderer for event bars |
See also
- Calendar — The main Calendar that hosts this view
- EventList — Parent class providing grid-based event listing
- AgendaColumn — The column that renders agenda day cells
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
The spacing between event bars in the default rendering of a day cell.
-
The "Settings" button which is a floating button which offers the Agenda range selection menu
- actionKey : String
The composed key name to press to open the settings menu. Default is 'CTRL+R'
Has a corresponding runtime settingsButton property.
- actionKey : String
-
Specify
falseto display column headers
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of AgendaView class, or subclass thereof.
-
Yields a
Mapwhich contains the cell data for each date in the current view. This is aMapwhere the keys are the date strings in the formatYYYY-MM-DDand the values are DayCell objects which contain the data for that cell. -
A callback function, or the name of a function in the ownership hierarchy which an application may provide to filter out agenda rows for individual dates.
Has a corresponding dateFilter config.
-
Returns the resource associated with this agenda view when used inside a ResourceView
-
The "Settings" button which is a floating button which offers the Agenda range selection menu
- actionKey : String
The composed key name to press to open the settings menu. Default is 'CTRL+R'
Has a corresponding settingsButton config.
- actionKey : String
-
Identifies an object as an instance of AgendaView class, or subclass thereof.