v7.3.0

CalendarRow
Widget

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

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • Set this to false to not use transition for this Widget as it changes height

  • Specify true to textually compress day number pairs. For example, compress "11/12" to "11/2". Also when true, 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 hourHH:MM string 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 the duration spans 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.

  • selectedDateCls : Stringb-selected-date

    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
  • 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 the duration spans multiple days.

    Has a corresponding fullWeek config.

  • A Promise which will be in Pending state only when the minHeight is animating to a new value.

  • isCalendarRow : Booleantrue
    READONLY
    ADVANCED
    Identifies an object as an instance of CalendarRow 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-calendar-row-compact-header-font-size The font size for the day name and date in the header when `compactHeader` is set.
    --b-calendar-row-non-working-day-background Non-working day background
    type: calendarrow

    Source path

    Calendar/widget/CalendarRow.js

    Contents