EventList

A Grid view of the EventStore.

This shows a configured range of events from the event store.

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 EventList's header context menu is extended to allow the user to change the range type. This may be disabled by configuring the listRangeMenu as null.

For further information about features available to be configured directly into EventList calendar views, see the Grid documentation and the associated examples.

List view
//<code-header>
fiddle.title = 'List view';
//</code-header>
new EventList({
    appendTo : targetElement,
    height   : 700,
    date     : '2021-09-01',
    events   : [
        { startDate : '2021-09-01T07:00', duration : 2, durationUnit : 'h', name : 'Water flowers', eventColor : 'red' },
        { startDate : '2021-09-31T09:00', duration : 3, durationUnit : 'h', name : 'Take daughter to volley ball', eventColor : 'pink' },
        { startDate : '2021-09-04T07:00', duration : 5, durationUnit : 'h', name : 'Walk the dog', eventColor : 'yellow' },
        { startDate : '2021-09-04T09:00', duration : 2, durationUnit : 'h', name : 'Buy masks', eventColor : 'orange' },
        { startDate : '2021-09-05T07:00', duration : 1, durationUnit : 'h', name : 'Zoom meeting', eventColor : 'deep-orange' },
        { startDate : '2021-09-05T09:00', duration : 1, durationUnit : 'h', name : 'Get a haircut', eventColor : 'gray' }
    ]
});

Configs

202

Common

dataGridBase
emptyTextGridBase
featuresGridBase
keyMapGridBase
listenersEvents
rowHeightGridBase
storeGridBase

Other

Column definitions to add to the default columns, or column definitions which override the provided, default columns.

By default, the EventList shows three columns:

columns : [{
    text  : 'Name',
    field : 'name'
}, {
    text  : 'Start',
    field : 'startDate'
}, {
    text  : 'End',
    field : 'endDate'
}]

Your columns config is appended to the default columns unless you provide columns for the name, startDate and endDate fields, in which case your column definitions are merged into the default column definitions.

In this way you can provide a renderer for the default columns, or otherwise configure them in a customizable way.

You can also supply columns keyed by field, to reconfigure / remove / add similar to how you would manage items in containers and menus:

columns : {
  // Remove the name column
  name : null,
  // Change the format of the startDate column
  startDate : {
     format : 'YYYY'
  },
  // Add a description column
  description : {
     renderer : ({ record }) => record.description.substring(0, 10)
  }
}
eventListTimeFormat: String | function= HH:mm

A DateHelper format string/function used to format the time displayed next to event bars in the custom columns which EventList based views use - EventList and AgendaView.

ParameterTypeDescription
dateDate

The date to format.

Returns: String -

The formatted date.

A function, or name of a function in the ownership hierarchy which is used to create the time output next to event bars in an agenda cell.

The result of this function is used as the content of an element which has the CSS class 'b-cal-event-list-event-time'.

modes :
    agenda : {
        // Add extra info below the time.
        // We set .b-cal-event-list-event-time to flex-direction : column
        eventTimeRenderer({ eventRecord, date }) {
            return [
                this.defaultEventTimeRenderer({ eventRecord, date }),
                {
                    className : 'event-location',
                    text      : eventRecord.location
                }
            ];
        }
    }
}
ParameterTypeDescription
eventRecordEventModel

The event record for which to create a time string.

dateDate

The date of the cell in which the event is being rendered.

Returns: String | DomConfig | DomConfig[]

A RangeMenu configuration block which configures the range choosing menu provided which by default selects one of the following:

  • day
  • week
  • month
  • year
  • decade

This may be used to either reconfigure that menu, or, by configuring it as null, could remove the menu entirely if the date range of this view is controlled by other means.

The individual range menu items are under the items property and have the following property names:

  • listRangeDayItem
  • listRangeWeekItem
  • listRangeMonthItem
  • listRangeYearItem
  • listRangeDecadeItem

These may be reconfigured:

calendar = new Calendar({
    ...
    modes : {
        agenda : {
            listRangeMenu : {
                items : {
                    // We don't want the decade range option
                    listRangeDecadeItem : null
                }
            }
        }
    }
});
activationKeyCalendarMixin
allowDragCreateCalendarMixin
allowDragMoveCalendarMixin
allowDragResizeCalendarMixin
animateTimeShiftCalendarMixin
autoCreateCalendarMixin
columnWidget
dateDateRangeOwner
defaultFocusContainer
descriptionRendererCalendarMixin
dragUnitCalendarMixin
drawerPanel
endDateDateRangeOwner
eventFilterDayCellCollecter
eventHeightCalendarMixin
eventSorterCalendarMixin
extendAllDayEndDayCalendarMixin
fixedDurationDateRangeOwner
hideNonWorkingDaysCalendarMixin
labelPositionContainer
maxDateCalendarMixin
minDateCalendarMixin
nonWorkingDaysCalendarMixin
pastEventClsCalendarMixin
rangeDateRangeOwner
renditionContainer
resourceImagePathCalendarMixin
responsiveResponsive
responsiveRootResponsive
responsiveStateResponsive
rtlRTL
selectorButtonCalendarMixin
selectorMenuItemCalendarMixin
shiftIncrementDateRangeOwner
shortDateFormatCalendarMixin
shortDateTimeFormatCalendarMixin
shortEventClsCalendarMixin
shortEventDurationCalendarMixin
showBulletCalendarMixin
showResourceAvatarsCalendarMixin
spanWidget
stackMultiDayEventsDayCellCollecter
startDateDateRangeOwner
stateSettingsGridState
syncCalendarDateCalendarMixin
syncViewDateCalendarMixin
timeFormatCalendarMixin
transitionGridBase
weekStartDayCalendarMixin

Accessibility

ariaLabelWidget

Content

bbarPanel
defaultsContainer
footerPanel
headerPanel
itemsContainer
lazyItemsContainer
namedItemsContainer
stripsPanel
tbarPanel
textContentContainer
toolsPanel

CSS

bodyClsPanel
borderContainer
clsWidget
colorWidget
htmlClsWidget
itemClsContainer
styleWidget
uiPanel

DOM

adoptWidget
appendToWidget
contentWidget
datasetWidget
htmlWidget
idWidget
tagWidget

Float & align

alignWidget
anchorWidget
centeredWidget
draggableWidget
floatingWidget
xWidget
yWidget

Layout

alignSelfWidget
autoHeightGridBase
dockWidget
flexWidget
getRowHeightGridBase
heightWidget
hiddenWidget
hideWhenEmptyContainer
layoutContainer
layoutStyleContainer
marginWidget
maxHeightWidget
maxWidthWidget
minHeightGridBase
minWidthWidget
textAlignWidget
weightWidget
widthWidget

Masking

loadMaskLoadMaskable
loadMaskDefaultsLoadMaskable
loadMaskErrorLoadMaskable
syncMaskLoadMaskable

misc

tabBarItemsContainer

Misc

cellEllipsisGridBase
columnLinesGridBase
dataFieldWidget
destroyStoreGridBase
disabledWidget
enableStickyGridBase
enableUndoRedoKeysGridElementEvents
hideFootersGridBase
hideHeadersGridBase
hoverClsGridElementEvents
iconPanel
localeClassLocalizable
localizableLocalizable
longPressTimeGridElementEvents
maskDefaultsGridBase
maskedWidget
ownerWidget
pluginsPluggable
readOnlyGridBase
refWidget
responsiveLevelsGridResponsive
rippleWidget
rowLinesGridBase
showDirtyGridBase
tabWidget
titlePanel
tooltipWidget

Record

recordContainer

Scrolling

scrollableGridBase

Selection

selectionModeGridSelection

State

stateIdState

Tree

Properties

181

Common

columnsGridBase
dataGridBase
emptyTextGridBase
featuresGridFeatures
rowHeightGridBase
storeGridBase
subGridsGridSubGrids

Class hierarchy

isEventList: Boolean= truereadonly
Identifies an object as an instance of EventList class, or subclass thereof.
isEventList: Boolean= truereadonlystatic
Identifies an object as an instance of EventList class, or subclass thereof.
isCalendarMixinCalendarMixin
isContainerContainer
isDateRangeOwnerDateRangeOwner
isDayCellCollecterDayCellCollecter
isDelayableDelayable
isEventsEvents
isGridGrid
isGridBaseGridBase
isGridElementEventsGridElementEvents
isGridFeaturesGridFeatures
isGridResponsiveGridResponsive
isGridSelectionGridSelection
isGridStateGridState
isGridSubGridsGridSubGrids
isKeyMapKeyMap
isLoadMaskableLoadMaskable
isLocalizableLocalizable
isPanelPanel
isPluggablePluggable
isResponsiveResponsive
isStateState
isToolableToolable
isWidgetWidget

Other

A function, or name of a function in the ownership hierarchy which is used to create the time output next to event bars in an agenda cell.

The result of this function is used as the content of an element which has the CSS class 'b-cal-event-list-event-time'.

modes :
    agenda : {
        // Add extra info below the time.
        // We set .b-cal-event-list-event-time to flex-direction : column
        eventTimeRenderer({ eventRecord, date }) {
            return [
                this.defaultEventTimeRenderer({ eventRecord, date }),
                {
                    className : 'event-location',
                    text      : eventRecord.location
                }
            ];
        }
    }
}
ParameterTypeDescription
eventRecordEventModel

The event record for which to create a time string.

dateDate

The date of the cell in which the event is being rendered.

Returns: String | DomConfig | DomConfig[]

This property yields a RangeMenu configuration block which encapsulates the range choices which this widget may be set to encapsulate:

  • day
  • week
  • month
  • year
  • decade

By default a list view adds these choices to the header context menu. An agenda view creates a floating settings button which offers this menu. The property may be used to create a custom UI for changing the range. The value yielded by the default get listRangeMenu() implementation looks like this:

{
    items : {
        listRangeDayItem    : {config for DAY range menu item },
        listRangWeekItem    : {config for WEEK range menu item },
        listRangMonthItem   : {config for MONTH range menu item },
        listRangeYearItem   : {config for YEAR range menu item },
        listRangeDecadeItem : {config for DECADE range menu item }
    }
}

A subclass can override get listRangeMenu() and mutate the object returned by the super call.

For example, it could delete properties of the items block to limit which ranges may be selected.

Returns the resource associated with this event list when used inside a ResourceView

$namestaticWidget
allowDragCreateCalendarMixin
allowDragMoveCalendarMixin
allowDragResizeCalendarMixin
animateTimeShiftCalendarMixin
autoCreateCalendarMixin
columnWidget
dateDateRangeOwner
dayCellClsCalendarMixin
dragUnitCalendarMixin
durationCalendarMixin
endDateDateRangeOwner
eventCountCalendarMixin
extendAllDayEndDayCalendarMixin
firstItemContainer
firstVisibleCellCalendarMixin
firstVisibleDateCalendarMixin
fixedDurationDateRangeOwner
hasChangesContainer
hideNonWorkingDaysCalendarMixin
isValidContainer
itemsContainer
labelPositionContainer
lastItemContainer
lastVisibleCellCalendarMixin
lastVisibleDateCalendarMixin
maxDateCalendarMixin
minDateCalendarMixin
modeNameCalendarMixin
nonWorkingDaysCalendarMixin
pastEventClsCalendarMixin
rangeDateRangeOwner
renditionContainer
rtlRTL
shiftIncrementDateRangeOwner
shortDateFormatCalendarMixin
shortDateTimeFormatCalendarMixin
spanWidget
stackMultiDayEventsDayCellCollecter
startDateDateRangeOwner
stateSettingsGridState
stepUnitCalendarMixin
syncCalendarDateCalendarMixin
syncViewDateCalendarMixin
toolsPanel
transitionGridBase
typestaticWidget
valuesContainer
visibleCellSelectorCalendarMixin

Accessibility

keyMapKeyMap

Content

bbarPanel
tbarPanel

CSS

clsWidget

DOM

appendToWidget
contentWidget
datasetWidget
elementWidget
htmlWidget
idWidget
styleWidget

Float & align

xWidget
yWidget

Layout

alignSelfWidget
bodyHeightGridBase
flexWidget
footerHeightGridBase
headerHeightGridBase
heightWidget
layoutContainer
layoutStyleContainer
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
widthWidget

Lifecycle

configBase

Misc

cellEllipsisGridBase
cellInfoWidget
columnLinesGridBase
disabledWidget
enableUndoRedoKeysGridElementEvents
hideFootersGridBase
hideHeadersGridBase
hoveredCellGridElementEvents
localeHelperLocalizable
localeManagerLocalizable
longPressTimeGridElementEvents
pluginsPluggable
readOnlyGridBase
refWidget
responsiveLevelGridResponsive
rowLinesGridBase
tabWidget
titlePanel
tooltipWidget

Record

recordContainer

Rows

Scrolling

Selection

selectedCellGridSelection
selectedCellsGridSelection
selectedRecordGridSelection
selectedRecordsGridSelection
selectedRowsGridSelection
selectionModeGridSelection

State

stateGridState

Tree

Visibility

hiddenWidget
isVisibleWidget

Widget hierarchy

ownerWidget
parentWidget
widgetMapContainer

Functions

147

Other

This method produces the date details block in AgendaView cells as a DomConfig object.

The content is encapsulated in an element with CSS class b-cal-agenda-date.

ParameterTypeDescription
dateDate
Returns: DomConfig -

The date details block in the following format:

{
    className : {
        'b-day-name'        : 1,
        'b-cal-agenda-date' : 1,
        'b-today'           : true|false
    },
    'aria-hidden' : true,
    children      : [{
        className : {
            'b-cal-agenda-date-date-number' : 1
        },
        text : 15 // The date
    }, {
        className : {
            'b-cal-agenda-date-date-text' : 1
        },
        children : [{
            text : 'Monday' // The day name
        }, {
            text : 'Jun 2020' // The month and year
        }]
    }]
}

Creates the Month utility object. We use it to track what week we are looking at.

Produces the time details next to the event bar in EventList and AgendaView.

This may be called from a custom eventTimeRenderer function to produce the default time details.

ParameterTypeDescription
eventRecordEventModel
forDateDate

The date cell into which the event is being rendered.

Returns: String -

The time details.

This method produces the event time details next to the event bar in EventList and AgendaView as a DomConfig object.

The content is encapsulated in an element with CSS class b-cal-event-list-event-time. For multi day events, the ending date is shown. For intra-day events, the start and end times are shown.

ParameterTypeDescription
eventRecordEventModel
forDateDate

The date cell into which the event is being rendered.

Returns: DomConfig

This is added as a listener by the CalendarStores mixin.

Our store is chained off of the EventStore; refill it if the EventStore changes. The store will fire events which cause UI update. We must fire a refresh event so that the encapsulating Calendar view knows about this.

When the date we have been told to look at changes, recalculate the date range. If the date range changes, this will cause a refill of our grid store from the master event store.

Scrolls vertically to bring an event or a time into view.

ParameterTypeDescription
targetEventModel | Date | String

The event to scroll to or a Date, or YYYY-MM-DD date to scroll to.

optionsObject

How to scroll.

options.blockString

How far to scroll the target: start/end/center/nearest.

options.edgeOffsetNumber

edgeOffset A margin around the target to bring into view.

options.animateObject | Boolean | Number

Set to true to animate the scroll by 300ms, or the number of milliseconds to animate over, or an animation config object.

options.animate.durationNumber

The number of milliseconds to animate over.

options.animate.easingString

The name of an easing function.

options.highlightBoolean | function

Set to true to highlight the resulting element when it is in view. May be a function which is called passing the resulting element to provide customized highlighting.

options.focusBoolean

Set to true to focus the element when it is in view.

options.yBoolean

Pass as false to disable scrolling in the Y axis.

Returns: Promise -

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

When an EventStore arrives, chain off a slave store from that which we can then filter to only show the week we are focused upon.

addContainer
calendarHitTestCalendarMixin
composeWidget
createEventCalendarMixin
createOnFrameDelayable
disableWidget
enableWidget
focusWidget
getAtContainer
getDayElementCalendarMixin
getEventElementCalendarMixin
getEventElementsCalendarMixin
getEventRecordCalendarMixin
getResourceRecordCalendarMixin
getTimeRangesCalendarMixin
getWidgetByIdContainer
insertContainer
isTodayCalendarMixin
LstaticLocalizable
maskWidget
nextCalendarMixin
onEvents
onEventCreatedCalendarMixin
previousCalendarMixin
recomposeWidget
refreshCalendarMixin
refreshSoonCalendarMixin
relayAllEvents
removeContainer
removeAllContainer
resetValuesContainer
resolveEventRecordCalendarMixin
setValuesContainer
triggerEvents
unEvents
unmaskWidget

Configuration

applyDefaultsstaticBase

Events

Float & align

alignToWidget
setXYWidget
showByWidget
toFrontWidget

Getters

getCellGridBase

Lifecycle

createstaticWidget
destroystaticBase
initClassstaticWidget

Misc

addPluginsPluggable
attachTooltipstaticWidget
fromElementstaticWidget
fromSelectorstaticWidget
getByIdstaticWidget
getPluginPluggable
hasFeatureGridFeatures
hasPluginPluggable
isOfTypeNamestaticBase
maskBodyGridBase
mixinstaticBase
optionalLstaticLocalizable
unmaskBodyGridBase

Rendering

refreshRowGridBase
refreshRowsGridBase
renderRowsGridBase

Rows

getRowForGridBase

Scrolling

scrollToTopGridBase
storeScrollGridBase

Selection

deselectAllGridSelection
deselectCellGridSelection
deselectCellsGridSelection
deselectRowGridSelection
deselectRowsGridSelection
isCellSelectedGridSelection
isSelectableGridSelection
isSelectedGridSelection
selectAllGridSelection
selectCellGridSelection
selectCellRangeGridSelection
selectCellsGridSelection
selectRangeGridSelection
selectRowGridSelection
selectRowsGridSelection

State

SubGrid

getSubGridGridSubGrids

Visibility

hideWidget
showWidget

Widget hierarchy

closestWidget
containsWidget
ownsWidget
queryWidget
queryAllWidget
upWidget

Events

56
beforeAutoCreateCalendarMixin
beforeChangeDateCalendarMixin
catchAllEvents
cellClickGridElementEvents
cellContextMenuGridElementEvents
cellDblClickGridElementEvents
cellMapPopulatedDayCellCollecter
cellMouseEnterGridElementEvents
cellMouseLeaveGridElementEvents
cellMouseOutGridElementEvents
cellMouseOverGridElementEvents
dataChangeGridBase
dayCellPopulatedDayCellCollecter
destroyEvents
dragSelectingGridSelection
eventAutoCreatedCalendarMixin
eventPropagateDayCellCollecter
expandPanel
focusInWidget
focusOutWidget
headerClickGridElementEvents
hideWidget
mouseOutGridElementEvents
mouseOverGridElementEvents
paintWidget
rangeChangeDateRangeOwner
readOnlyWidget
recomposeWidget
renderRowGridBase
renderRowsGridBase
resizeWidget
responsiveGridResponsive
rowMouseEnterGridElementEvents
rowMouseLeaveGridElementEvents
scrollGridBase
selectionChangeGridSelection
selectionModeChangeGridSelection
shiftIncrementChangeDateRangeOwner
showWidget

Event handlers

56
onBeforeAutoCreateCalendarMixin
onBeforeChangeDateCalendarMixin
onCellClickGridElementEvents
onCellContextMenuGridElementEvents
onCellDblClickGridElementEvents
onCellMapPopulatedDayCellCollecter
onCellMouseEnterGridElementEvents
onCellMouseLeaveGridElementEvents
onCellMouseOutGridElementEvents
onCellMouseOverGridElementEvents
onDataChangeGridBase
onDayCellPopulatedDayCellCollecter
onDestroyEvents
onDragSelectingGridSelection
onEventAutoCreatedCalendarMixin
onEventPropagateDayCellCollecter
onFocusInWidget
onHeaderClickGridElementEvents
onHideWidget
onMouseOutGridElementEvents
onMouseOverGridElementEvents
onPaintWidget
onRangeChangeDateRangeOwner
onRenderRowGridBase
onRenderRowsGridBase
onResizeWidget
onResponsiveGridResponsive
onRowMouseEnterGridElementEvents
onRowMouseLeaveGridElementEvents
onScrollGridBase
onSelectionChangeGridSelection
onShowWidget

Typedefs

18

CSS variables

86
NameDescription
--b-event-list-day-selector-selected-date-backgroundSelected date's background color in the day selector
--b-event-list-day-selector-selected-date-colorSelected date's color in the day selector
--b-event-list-event-column-resource-row-gapGap between resource avatars