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.

Configs

140

Common

listenersEvents

Other

animate: Boolean= true

Set this to false to not use transition for this Widget as it changes height

autoHeight: Boolean

By default, this widget displays a maximum of defaultEventRowCount events before showing overflow indicators, and becoming expandable.

Configuring this as true makes this widget accommodate all events with no overflow.

Configure this property as true to show the day name and date headers in a more compact style.

When this is set, the day name and date are displayed side by side instead of on separate lines and with a smaller font size.

This applies the b-compact-header CSS class to this widget which may be styled as required.

dateFilter: function | StringAlso a property

A callback function which an application may provide to filter out day columns for individual dates.

ParameterTypeDescription
contextDayCell

Information about the day column to be created.

Returns: Boolean -

Return false to not display a column for the passed date.

dayHeaderRenderer: function | String

A function, or name of a function which is passed the DomConfig object which will be used to sync with a day cell header.

dayHeaderRenderer : function(headerDomConfig, cellData) {
    if (this.isSpecialDate(cellData.date)) {
        headerDomConfig.className['b-is-special-date'] = 1;

        // Add to the content element's children
        headerDomConfig.children.push({
            text : 'Special day',
            className : 'b-special-day
        });
    }
}

The result is used to sync the DOM of the day column.

ParameterTypeDescription
headerDomConfigDomConfig | Object

A DomConfig config object which is used to sync the day header element.

headerDomConfig.classNameObject

An object who's truthy property names will be applied as class names.

headerDomConfig.styleObject

A CSS style definition object.

headerDomConfig.datasetObject

The DOM data properties to set.

headerDomConfig.childrenDomConfig[]

The DomConfig definitions the header content. There will be 2 children encapsulating the day name and the date.

cellDataDayCell

A DayCell object that contains data about the cell.

Returns: String
dayNameFormat: String | function= ddd

The DateHelper format string/function for day names (e.g., "ddd" for "Mon", "Tue", ...)

ParameterTypeDescription
dateDate

The date to format.

Returns: String -

The formatted date.

dayNumberCompress: Boolean= false

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.

dayNumberFormat: String= D

The DateHelper format string for day numbers (e.g., "D" for "9", "10", ...)

daySeparator: String | String[]

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.

dayStartShift: String | Number= 0

Either the start hour of the day, or a 24 hour HH: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.

gutterHeight: Number | String

How much extra space in pixels or other DOM units to allow below the event bars to facilitate drag-create gestures.

Configure this as true to hide day columns which contain no events.

Use with care. This may result in no day columns being rendered for completely empty time ranges.

minDayWidth: Number

By default, the day columns flex to all fit within the width of this widget.

configuring a minDayWidth means that if the day columns do not fit within this widget's width, it becomes horizontally scrollable.

overflowClickAction: popup | expand

How the view responds to clicking on a +n more button in an overflowing day cell.

The default value, 'popup', means that a small dialog box showing the full complement of events for that cell is shown aligned to the cell.

When set to 'expand', then clicking the +n more button causes the encapsulating row to expand to accommodate all events in that row with no overflow.

Navigating to a new month resets the row to its default, flexed height.

selectedDateCls: String= b-selected-date

The CSS class to apply to the header element for this view's date.

activationKeyCalendarMixin
allowDragCreateCalendarMixin
allowDragMoveCalendarMixin
allowDragResizeCalendarMixin
animateTimeShiftCalendarMixin
autoCreateCalendarMixin
columnWidget
dateDateRangeOwner
dayCellNameFormatDayCellRenderer
dayCellRendererDayCellRenderer
descriptionRendererCalendarMixin
dragUnitCalendarMixin
emptyCellRendererDayCellRenderer
endDateDateRangeOwner
eventFilterDayCellCollecter
eventHeightCalendarMixin
eventSorterCalendarMixin
eventSpacingDayCellRenderer
extendAllDayEndDayCalendarMixin
fixedDurationDateRangeOwner
hideNonWorkingDaysCalendarMixin
maxDateCalendarMixin
minDateCalendarMixin
nonWorkingDaysCalendarMixin
overflowButtonRendererDayCellRenderer
overflowPopupDayCellRenderer
overflowPopupTriggerDayCellRenderer
pastEventClsCalendarMixin
rangeDateRangeOwner
resourceImagePathCalendarMixin
responsiveResponsive
responsiveRootResponsive
responsiveStateResponsive
rtlRTL
selectorButtonCalendarMixin
selectorMenuItemCalendarMixin
shiftIncrementDateRangeOwner
shortDateFormatCalendarMixin
shortDateTimeFormatCalendarMixin
shortEventClsCalendarMixin
shortEventDurationCalendarMixin
showBulletCalendarMixin
showResourceAvatarsCalendarMixin
spanWidget
stackMultiDayEventsDayCellCollecter
startDateDateRangeOwner
syncCalendarDateCalendarMixin
syncViewDateCalendarMixin
timeFormatCalendarMixin
weekStartDayCalendarMixin

Accessibility

ariaLabelWidget
keyMapKeyMap

CSS

clsWidget
colorWidget
htmlClsWidget
styleWidget
uiWidget

DOM

adoptWidget
appendToWidget
contentWidget
datasetWidget
htmlWidget
idWidget
tagWidget
titleWidget

Float & align

alignWidget
anchorWidget
centeredWidget
draggableWidget
floatingWidget
xWidget
yWidget

Layout

alignSelfWidget
dockWidget
flexWidget
heightWidget
hiddenWidget
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
textAlignWidget
weightWidget
widthWidget

Misc

dataFieldWidget
disabledWidget
localeClassLocalizable
localizableLocalizable
maskedWidget
ownerWidget
readOnlyWidget
refWidget
rippleWidget
tabWidget
tooltipWidget

Scrolling

Properties

113

Class hierarchy

isCalendarRow: Boolean= truereadonly
Identifies an object as an instance of CalendarRow class, or subclass thereof.
isCalendarRow: Boolean= truereadonlystatic
Identifies an object as an instance of CalendarRow class, or subclass thereof.
isCalendarMixinCalendarMixin
isDateRangeOwnerDateRangeOwner
isDayCellCollecterDayCellCollecter
isDayCellRendererDayCellRenderer
isDelayableDelayable
isEventsEvents
isKeyMapKeyMap
isLocalizableLocalizable
isResponsiveResponsive
isWidgetWidget

Other

Configure this property as true to show the day name and date headers in a more compact style.

When this is set, the day name and date are displayed side by side instead of on separate lines and with a smaller font size.

This applies the b-compact-header CSS class to this widget which may be styled as required.

dateFilter: function | StringAlso a config

A callback function which an application may provide to filter out day columns for individual dates.

ParameterTypeDescription
contextDayCell

Information about the day column to be created.

Returns: Boolean -

Return false to not display a column for the passed date.

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.

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

Configure this as true to hide day columns which contain no events.

Use with care. This may result in no day columns being rendered for completely empty time ranges.

$namestaticWidget
allowDragCreateCalendarMixin
allowDragMoveCalendarMixin
allowDragResizeCalendarMixin
animateTimeShiftCalendarMixin
autoCreateCalendarMixin
cellMapDayCellRenderer
columnWidget
dateDateRangeOwner
dayCellClsCalendarMixin
dragUnitCalendarMixin
durationCalendarMixin
endDateDateRangeOwner
eventCountCalendarMixin
eventSpacingDayCellRenderer
extendAllDayEndDayCalendarMixin
firstVisibleCellCalendarMixin
firstVisibleDateCalendarMixin
fixedDurationDateRangeOwner
hideNonWorkingDaysCalendarMixin
lastVisibleCellCalendarMixin
lastVisibleDateCalendarMixin
maxDateCalendarMixin
minDateCalendarMixin
modeNameCalendarMixin
nonWorkingDaysCalendarMixin
overflowPopupDayCellRenderer
pastEventClsCalendarMixin
rangeDateRangeOwner
rtlRTL
shiftIncrementDateRangeOwner
shortDateFormatCalendarMixin
shortDateTimeFormatCalendarMixin
spanWidget
stackMultiDayEventsDayCellCollecter
startDateDateRangeOwner
stepUnitCalendarMixin
syncCalendarDateCalendarMixin
syncViewDateCalendarMixin
typestaticWidget
visibleCellSelectorCalendarMixin

Accessibility

keyMapKeyMap

CSS

clsWidget

DOM

appendToWidget
contentWidget
datasetWidget
elementWidget
htmlWidget
idWidget
styleWidget

Float & align

xWidget
yWidget

Layout

alignSelfWidget
flexWidget
heightWidget
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
widthWidget

Lifecycle

configBase

Misc

cellInfoWidget
disabledWidget
localeHelperLocalizable
localeManagerLocalizable
readOnlyWidget
refWidget
tabWidget
tooltipWidget

Visibility

hiddenWidget
isVisibleWidget

Widget hierarchy

ownerWidget
parentWidget

Functions

75

Other

Brings an event or a time into view.

ParameterTypeDescription
targetEventModel | Date | Number

The event to scroll to or a Date to read the hour value from, or an hour number.

optionsBryntumScrollOptions

How to scroll.

Returns: Promise -

A promise which is resolved when the target has been scrolled into view.

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.

calendarHitTestCalendarMixin
composeWidget
createEventCalendarMixin
createOnFrameDelayable
disableWidget
enableWidget
focusWidget
getDayElementCalendarMixin
getEventElementCalendarMixin
getEventElementsCalendarMixin
getEventRecordCalendarMixin
getResourceRecordCalendarMixin
getTimeRangesCalendarMixin
isTodayCalendarMixin
LstaticLocalizable
maskWidget
nextCalendarMixin
onEvents
onEventCreatedCalendarMixin
previousCalendarMixin
recomposeWidget
refreshCalendarMixin
refreshSoonCalendarMixin
relayAllEvents
resolveEventRecordCalendarMixin
triggerEvents
unEvents
unmaskWidget

Configuration

applyDefaultsstaticBase

Events

Float & align

alignToWidget
setXYWidget
showByWidget
toFrontWidget

Lifecycle

createstaticWidget
destroystaticBase
initClassstaticWidget

Misc

attachTooltipstaticWidget
fromElementstaticWidget
fromSelectorstaticWidget
getByIdstaticWidget
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Visibility

hideWidget
showWidget

Widget hierarchy

closestWidget
containsWidget
ownsWidget
queryWidget
queryAllWidget
upWidget

Events

30

Fires when this CalendarRow has completely changed its height. This fires after the animation has finished.

// Adding a listener using the "on" method
calendarRow.on('heightChange', ({ source, oldHeight, height }) => {

});
ParameterTypeDescription
sourceCalendarRow

The triggering instance.

oldHeightNumber

The old height.

heightNumber

The new height.

Fires when this CalendarRow refreshes.

// Adding a listener using the "on" method
calendarRow.on('refresh', ({ source }) => {

});
ParameterTypeDescription
sourceCalendarRow

The triggering instance.

beforeAutoCreateCalendarMixin
beforeChangeDateCalendarMixin
catchAllEvents
cellMapPopulatedDayCellCollecter
dayCellPopulatedDayCellCollecter
destroyEvents
emptyCellClickDayCellRenderer
eventAutoCreatedCalendarMixin
eventPropagateDayCellCollecter
eventsPerCellChangeDayCellRenderer
focusInWidget
focusOutWidget
hideWidget
paintWidget
rangeChangeDateRangeOwner
readOnlyWidget
recomposeWidget
resizeWidget
shiftIncrementChangeDateRangeOwner
showWidget
showOverflowPopupDayCellRenderer

Event handlers

30

Called when this CalendarRow has completely changed its height. This called after the animation has finished.

new CalendarRow({
    onHeightChange({ source, oldHeight, height }) {

    }
});
ParameterTypeDescription
sourceCalendarRow

The triggering instance.

oldHeightNumber

The old height.

heightNumber

The new height.

Called when this CalendarRow refreshes.

new CalendarRow({
    onRefresh({ source }) {

    }
});
ParameterTypeDescription
sourceCalendarRow

The triggering instance.

onBeforeAutoCreateCalendarMixin
onBeforeChangeDateCalendarMixin
onCellMapPopulatedDayCellCollecter
onDayCellPopulatedDayCellCollecter
onDestroyEvents
onEmptyCellClickDayCellRenderer
onEventAutoCreatedCalendarMixin
onEventPropagateDayCellCollecter
onEventsPerCellChangeDayCellRenderer
onFocusInWidget
onHideWidget
onPaintWidget
onRangeChangeDateRangeOwner
onResizeWidget
onShowWidget
onShowOverflowPopupDayCellRenderer

Typedefs

9
AlignSpecWidget
ColorWidget
DayCellDayCellCollecter
EventBarDayCellCollecter
ResponsiveStateResponsive

CSS variables

22
NameDescription
--b-calendar-row-non-working-day-backgroundNon-working day background
--b-calendar-row-compact-header-font-sizeThe font size for the day name and date in the header when `compactHeader` is set.

Inherited