Sidebar

This class is not supposed to be used directly. This widget provides the utility UI as the sidebar of a Calendar widget.

Sidebar items provided by default:

Widget ref Type Weight Description
datePicker CalendarDatePicker 100 Used to pick Calendar's active date
eventFilter FilterField 150 Used to filter events by name
resourceFilter ResourceFilter 200 Used to select resources to show events for

The configuration of these items may be overridden:

new Calendar({
    sidebar : {
        items : {
            datePicker : {
                // Never go to dates in the past
                minDate : new Date()
            },
            eventFilter : {
                // Let's have this at the top
                weight : 50
            },
            resourceFilter : {
                store : {
                    sorters : [{
                        field     : 'name',
                        // By default this is in ascending name order
                        // Let's change that round.
                        ascending : false
                    }]
                }
            }
        }
    }
});

The bbar is used to hold the navigation buttons ("Today" and next/previous) when the owning Calendar is configured with navigatorPlacement set to 'sidebar'. The location of the bbar, as well as other options, can be changed via the bbar config, like so:

 new Calendar({
     sidebar : {
         bbar : {
             dock : 'top'
         }
     }
 });

Sidebar widget
//<code-header>
fiddle.title = 'Sidebar widget';
//</code-header>
new Sidebar({
    appendTo : targetElement,
    height   : 500,
    width    : 400,
    items    : {
        // You can add new widgets to the side bar easily (as well as hide or customize built-in ones)
        project : {
            type   : 'combo',
            label  : 'Project',
            weight : 197,
            items  : [
                'Horizon Estates',
                'Harbor View Condos',
                'Apex Avenue'
            ]
        }
    },
    bbar : [
        {
            text : 'Custom button',
            onClick() {
                Toast.show('You clicked the button');
            }
        }
    ]
});

Configs

116

Common

listenersEvents

Other

If the datePicker is set to multiSelect, setting this to true shows a background highlight effect on the week rows that your selected range encompasses to help the end user visualize the time ranges being evaluated.

A configuration object specifying options to change how the sidebar's resourcefilter is configured.

side: left | right= left

May be configured with 'left' or 'right' to dock the Sidebar to either side.

Defaults to 'left'.

If the datePicker is set to multiSelect, then by default, cooperating views (See datePicker) will have their navigation shiftIncrement set to navigate week-by-week when using the Next and Previous buttons.

Configure this as false to have the views step forwards or backwards by exactly the length of the selected range.

columnWidget
defaultFocusContainer
drawerPanel
labelPositionContainer
renditionContainer
responsiveResponsive
responsiveRootResponsive
responsiveStateResponsive
rtlRTL
spanWidget

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

98

Class hierarchy

isSidebar: Boolean= truereadonly
Identifies an object as an instance of Sidebar class, or subclass thereof.
isSidebar: Boolean= truereadonlystatic
Identifies an object as an instance of Sidebar class, or subclass thereof.
isContainerContainer
isDelayableDelayable
isEventsEvents
isKeyMapKeyMap
isLocalizableLocalizable
isPanelPanel
isResponsiveResponsive
isStateState
isToolableToolable
isWidgetWidget

Other

If the datePicker is set to multiSelect, setting this to true shows a background highlight effect on the week rows that your selected range encompasses to help the end user visualize the time ranges being evaluated.

The resource filtering widget which hides and shows events based upon whether they are assigned to the selected resources.

If the datePicker is set to multiSelect, then by default, cooperating views (See datePicker) will have their navigation shiftIncrement set to navigate week-by-week when using the Next and Previous buttons.

Configure this as false to have the views step forwards or backwards by exactly the length of the selected range.

$namestaticWidget
columnWidget
firstItemContainer
hasChangesContainer
isValidContainer
itemsContainer
labelPositionContainer
lastItemContainer
renditionContainer
rtlRTL
spanWidget
toolsPanel
typestaticWidget
valuesContainer

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

74

Configuration

applyDefaultsstaticBase

Events

Float & align

alignToWidget
setXYWidget
showByWidget
toFrontWidget

Lifecycle

createstaticWidget
destroystaticBase
initClassstaticWidget

Misc

attachTooltipstaticWidget
fromElementstaticWidget
fromSelectorstaticWidget
getByIdstaticWidget
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Other

addContainer
composeWidget
createOnFrameDelayable
disableWidget
enableWidget
focusWidget
getAtContainer
getWidgetByIdContainer
insertContainer
LstaticLocalizable
maskWidget
onEvents
recomposeWidget
relayAllEvents
removeContainer
removeAllContainer
resetValuesContainer
setValuesContainer
triggerEvents
unEvents
unmaskWidget

State

Visibility

hideWidget
showWidget

Widget hierarchy

closestWidget
containsWidget
ownsWidget
queryWidget
queryAllWidget
upWidget

Events

23

Event handlers

23

Typedefs

8

CSS variables

54
NameDescription
--b-sidebar-border-inline-endBorder between sidebar and calendar
--b-sidebar-widthThe width applied to the `flex-basis` of the Sidebar When there is a date picker, this is overridden to a fixed width to make room for the date picker.

Inherited