DayResourceView

A calendar view showing resources grouped by date, it is normally used as a mode of a Calendar but may be used standalone as a regular Widget.

By default, it shows a one-week range encapsulating the Calendar's current date. This can be configured using the range config property.

Day resource view
//<code-header>
fiddle.title = 'Day resource view';
//</code-header>
const dayView = new DayResourceView({
    appendTo         : targetElement,
    height           : 500,
    startDate        : new Date(2020, 8, 2),
    endDate          : new Date(2020, 8, 5),
    dayStartTime     : 6,
    dayEndTime       : 19,
    visibleStartTime : 6,
    resources        : [
        {
            id         : 1,
            name       : 'John',
            eventColor : 'blue'
        },
        {
            id         : 2,
            name       : 'Mike',
            eventColor : 'orange'
        },
        {
            id         : 3,
            name       : 'Lisa',
            eventColor : 'red'
        }
    ],
    events : [
        { startDate : '2020-09-02T00:00', duration : 5, durationUnit : 'd', name : 'Boss vacation', eventColor : 'red', resourceId : 1 },
        { startDate : '2020-09-02T07:00', duration : 5, durationUnit : 'h', name : 'Walk the dog', eventColor : 'yellow', resourceId : 2 },
        { startDate : '2020-09-03T09:00', duration : 2, durationUnit : 'h', name : 'Buy masks', eventColor : 'orange', resourceId : 2 },
        { startDate : '2020-09-04T07:00', duration : 1, durationUnit : 'h', name : 'Zoom meeting', eventColor : 'deep-orange', resourceId : 3 },
        { startDate : '2020-09-05T09:00', duration : 1, durationUnit : 'h', name : 'Get a haircut', eventColor : 'gray', resourceId : 3 }
    ]
});

Configs

196

Common

listenersEvents

Other

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

This may result in no resource columns being rendered for completely empty dates.

By default, when a resource leaf column drops to below 100 pixels wide, the resource avatar hides.

Configure this as true to hide resource name when the resource leaf column width drops below 100 pixels wide.

The minimum width of a resource column. This must be a non-zero value to ensure that space is allocated even when there are many resources and a narrow viewport.

The default value is 4em

If the day columns columns overflow the horizontal space available, the columns will be scrollable horizontally in the normal way.

There is a horizontalScroller property which handles scrolling in this dimension.

A callback function which an application may provide to filter out resource columns for particular dates.

ParameterTypeDescription
contextDayCell

Information about the day column to be created.

Returns: Boolean -

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

By default, resource avatars are shown in the resource header if there is horizontal space. Configure this as false to inhibit this.

showHeaderAvatars: Boolean | last

Configure as true to show avatars of the resources (calendars) alongside resource names in resource column headers.

Configure as 'last' to show avatars of the assigned resources (calendars) after the name.

Note that you must set resourceImagePath in order that the system knows where to access the resource's image file from.

If no image is set, or the image is not found, the resource's initials are shown instead.

By default, it is inherited from the owning Calendar:

new Calendar({
    resourceImagePath   : 'images/resources/'
    modes : {
        dayresource : {
            showHeaderAvatars : true,
        }
    }
});
activationKeyCalendarMixin
allowDragCreateCalendarMixin
allowDragMoveCalendarMixin
allowDragResizeCalendarMixin
animateTimeShiftCalendarMixin
autoCreateCalendarMixin
columnWidget
coreHoursDayView
dateDateRangeOwner
dateFilterDayView
dayEndTimeDayView
defaultFocusContainer
descriptionRendererCalendarMixin
dragUnitCalendarMixin
drawerPanel
endDateDateRangeOwner
eventFilterDayCellCollecter
eventHeightCalendarMixin
eventSorterCalendarMixin
extendAllDayEndDayCalendarMixin
fitHoursDayView
hideNonWorkingDaysCalendarMixin
hourHeightDayView
incrementDayView
labelPositionContainer
maxDateCalendarMixin
minDateCalendarMixin
nonWorkingDaysCalendarMixin
pastEventClsCalendarMixin
rangeDateRangeOwner
renditionContainer
resourceImagePathCalendarMixin
responsiveResponsive
responsiveRootResponsive
responsiveStateResponsive
rtlRTL
selectorButtonCalendarMixin
selectorMenuItemCalendarMixin
shiftIncrementDateRangeOwner
shortDateFormatCalendarMixin
shortDateTimeFormatCalendarMixin
shortEventClsCalendarMixin
shortEventDurationCalendarMixin
showBulletCalendarMixin
showResourceAvatarsCalendarMixin
showTimeDayView
spanWidget
stackMultiDayEventsDayCellCollecter
startDateDateRangeOwner
syncCalendarDateCalendarMixin
syncViewDateCalendarMixin
timeFormatCalendarMixin
weekStartDayCalendarMixin

Accessibility

ariaLabelWidget
keyMapKeyMap

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
dockWidget
flexWidget
heightWidget
hiddenWidget
hideWhenEmptyContainer
layoutContainer
layoutStyleContainer
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
textAlignWidget
weightWidget
widthWidget

misc

tabBarItemsContainer

Misc

dataFieldWidget
disabledWidget
iconPanel
localeClassLocalizable
localizableLocalizable
maskedWidget
ownerWidget
readOnlyWidget
refWidget
rippleWidget
tabWidget
titlePanel
tooltipWidget

Record

recordContainer

Scrolling

State

stateIdState

Properties

167

Common

Class hierarchy

isDayResourceView: Boolean= truereadonly
Identifies an object as an instance of DayResourceView class, or subclass thereof.
isDayResourceView: Boolean= truereadonlystatic
Identifies an object as an instance of DayResourceView class, or subclass thereof.
isCalendarMixinCalendarMixin
isContainerContainer
isDateRangeOwnerDateRangeOwner
isDayCellCollecterDayCellCollecter
isDayViewDayView
isDelayableDelayable
isEventsEvents
isKeyMapKeyMap
isLocalizableLocalizable
isPanelPanel
isResponsiveResponsive
isStateState
isToolableToolable
isWidgetWidget

Other

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

This may result in no resource columns being rendered for completely empty dates.

By default, when a resource leaf column drops to below 100 pixels wide, the resource avatar hides.

Configure this as true to hide resource name when the resource leaf column width drops below 100 pixels wide.

The minimum width of a resource column. This must be a non-zero value to ensure that space is allocated even when there are many resources and a narrow viewport.

The default value is 4em

If the day columns columns overflow the horizontal space available, the columns will be scrollable horizontally in the normal way.

There is a horizontalScroller property which handles scrolling in this dimension.

A callback function which an application may provide to filter out resource columns for particular dates.

ParameterTypeDescription
contextDayCell

Information about the day column to be created.

Returns: Boolean -

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

By default, resource avatars are shown in the resource header if there is horizontal space. Configure this as false to inhibit this.

$namestaticWidget
allowDragCreateCalendarMixin
allowDragMoveCalendarMixin
allowDragResizeCalendarMixin
animateTimeShiftCalendarMixin
autoCreateCalendarMixin
cellMapDayView
columnWidget
coreHoursDayView
dateDateRangeOwner
dateFilterDayView
dayCellClsCalendarMixin
dayEndTimeDayView
dragUnitCalendarMixin
durationCalendarMixin
endDateDateRangeOwner
eventCountCalendarMixin
extendAllDayEndDayCalendarMixin
firstItemContainer
firstVisibleCellCalendarMixin
firstVisibleDateCalendarMixin
fitHoursDayView
hasChangesContainer
hideNonWorkingDaysCalendarMixin
hourHeightDayView
incrementDayView
isValidContainer
itemsContainer
labelPositionContainer
lastItemContainer
lastVisibleCellCalendarMixin
lastVisibleDateCalendarMixin
maxDateCalendarMixin
minDateCalendarMixin
modeNameCalendarMixin
nonWorkingDaysCalendarMixin
pastEventClsCalendarMixin
rangeDateRangeOwner
renditionContainer
resourceDayView
rtlRTL
shiftIncrementDateRangeOwner
shortDateFormatCalendarMixin
shortDateTimeFormatCalendarMixin
showTimeDayView
spanWidget
stackMultiDayEventsDayCellCollecter
startDateDateRangeOwner
stepUnitCalendarMixin
syncCalendarDateCalendarMixin
syncViewDateCalendarMixin
toolsPanel
typestaticWidget
valuesContainer
visibleCellSelectorCalendarMixin

Accessibility

keyMapKeyMap

Content

bbarPanel
tbarPanel

CSS

clsWidget

DOM

appendToWidget
contentWidget
datasetWidget
elementWidget
htmlWidget
idWidget
styleWidget

Float & align

xWidget
yWidget

Layout

alignSelfWidget
flexWidget
heightWidget
layoutContainer
layoutStyleContainer
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
widthWidget

Lifecycle

configBase

Misc

cellInfoWidget
disabledWidget
localeHelperLocalizable
localeManagerLocalizable
readOnlyWidget
refWidget
tabWidget
titlePanel
tooltipWidget

Record

recordContainer

State

stateState

Visibility

hiddenWidget
isVisibleWidget

Widget hierarchy

ownerWidget
parentWidget
widgetMapContainer

Functions

94

Configuration

applyDefaultsstaticBase

Events

Float & align

alignToWidget
setXYWidget
showByWidget
toFrontWidget

Lifecycle

createstaticWidget
destroystaticBase
initClassstaticWidget

Misc

attachTooltipstaticWidget
fromElementstaticWidget
fromSelectorstaticWidget
getByIdstaticWidget
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Other

addContainer
calendarHitTestCalendarMixin
composeWidget
createEventCalendarMixin
createOnFrameDelayable
disableWidget
eachHourDayView
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
scrollToDayView
setValuesContainer
triggerEvents
unEvents
unmaskWidget
zoomByDayView
zoomToDayView
zoomToFitDayView

State

Visibility

hideWidget
showWidget

Widget hierarchy

closestWidget
containsWidget
ownsWidget
queryWidget
queryAllWidget
upWidget

Events

35
beforeAutoCreateCalendarMixin
beforeChangeDateCalendarMixin
catchAllEvents
cellMapPopulatedDayCellCollecter
dayCellPopulatedDayCellCollecter
destroyEvents
eventAutoCreatedCalendarMixin
eventPropagateDayCellCollecter
expandPanel
focusInWidget
focusOutWidget
hideWidget
paintWidget
rangeChangeDateRangeOwner
readOnlyWidget
recomposeWidget
refreshDayView
resizeWidget
shiftIncrementChangeDateRangeOwner
showWidget
tickChangeDayView

Event handlers

35

Typedefs

13

CSS variables

82