v7.3.0

AgendaView
Widget

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
No results

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.

  • Specify false to display column headers

Properties

Properties are getters/setters or publicly accessible variables on this class
  • cellMap : Map
    READONLY

    Yields a Map which contains the cell data for each date in the current view. This is a Map where the keys are the date strings in the format YYYY-MM-DD and 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.

  • isAgendaView : Booleantrue
    READONLY
    ADVANCED
    Identifies an object as an instance of AgendaView class, or subclass thereof.

Functions

Functions are methods available for calling on the class

    Events

    Events are triggered for certain actions in this class and can be listened for to react to those actions in your code

    Event handlers

    Event handlers are callbacks called as a result of certain actions in this class

    CSS variables

    CSS variables that can be set to adjust appearance
    Name Description
    --b-agenda-view-cell-color Cell color
    --b-agenda-view-cell-padding-block Cell padding block
    --b-agenda-view-cell-padding-inline Cell padding inline
    --b-agenda-view-date-margin Date margin
    --b-agenda-view-date-number-font-size Date number font size
    --b-agenda-view-date-number-margin Date number margin
    --b-agenda-view-date-padding Date padding
    --b-agenda-view-date-width Date width
    --b-agenda-view-header-padding Header padding
    --b-agenda-view-non-working-day-background Non-working day background
    --b-agenda-view-time-width Time width
    --b-agenda-view-time-width-small Time width in small viewport
    --b-agenda-view-today-date-number-font-size Today date number font size