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
Configs
140Common
Other
Set this to false to not use transition for this Widget as it changes height
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.
A callback function which an application may provide to filter out day columns for individual dates.
| Parameter | Type | Description |
|---|---|---|
context | DayCell | Information about the day column to be created. |
Return false to not display a column for the passed date.
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.
| Parameter | Type | Description |
|---|---|---|
headerDomConfig | DomConfig | Object | A DomConfig config object which is used to sync the day header element. |
headerDomConfig.className | Object | An object who's truthy property names will be applied as class names. |
headerDomConfig.style | Object | A CSS style definition object. |
headerDomConfig.dataset | Object | The DOM data properties to set. |
headerDomConfig.children | DomConfig[] | The DomConfig definitions the header content.
There will be 2 |
cellData | DayCell | A |
The DateHelper format string/function for day names (e.g., "ddd" for "Mon", "Tue", ...)
| Parameter | Type | Description |
|---|---|---|
date | Date | The date to format. |
The formatted date.
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 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.
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.
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.
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.
The CSS class to apply to the header element for this view's date.
DOM
Float & align
Layout
Misc
Scrolling
Properties
113
Properties
113Class hierarchy
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.
A callback function which an application may provide to filter out day columns for individual dates.
| Parameter | Type | Description |
|---|---|---|
context | DayCell | Information about the day column to be created. |
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.
CSS
DOM
Layout
Misc
Functions
75
Functions
75Other
Brings an event or a time into view.
| Parameter | Type | Description |
|---|---|---|
target | EventModel | Date | Number | The event to scroll to or
a |
options | BryntumScrollOptions | How to scroll. |
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.
Configuration
Events
Misc
Widget hierarchy
Events
30
Events
30Fires 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 }) => {
});| Parameter | Type | Description |
|---|---|---|
source | CalendarRow | The triggering instance. |
oldHeight | Number | The old height. |
height | Number | The new height. |
Fires when this CalendarRow refreshes.
// Adding a listener using the "on" method
calendarRow.on('refresh', ({ source }) => {
});| Parameter | Type | Description |
|---|---|---|
source | CalendarRow | The triggering instance. |
Event handlers
30
Event handlers
30Called when this CalendarRow has completely changed its height. This called after the animation has finished.
new CalendarRow({
onHeightChange({ source, oldHeight, height }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | CalendarRow | The triggering instance. |
oldHeight | Number | The old height. |
height | Number | The new height. |
Called when this CalendarRow refreshes.
new CalendarRow({
onRefresh({ source }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | CalendarRow | The triggering instance. |
Typedefs
9
Typedefs
9CSS variables
22
CSS variables
22| Name | Description |
|---|---|
--b-calendar-row-non-working-day-background | Non-working day background |
--b-calendar-row-compact-header-font-size | The font size for the day name and date in the header when `compactHeader` is set. |