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'
}
}
});
//<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
Configs
116Common
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.
May be configured with 'left' or 'right' to dock the Sidebar to either side.
Defaults to 'left'.
Content
CSS
DOM
Float & align
Layout
misc
Misc
Scrolling
Properties
98
Properties
98Class hierarchy
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.
CSS
DOM
Layout
Misc
State
Widget hierarchy
Functions
74
Functions
74Configuration
Events
Misc
Other
Widget hierarchy
Events
23
Events
23Event handlers
23
Event handlers
23Typedefs
8
Typedefs
8CSS variables
54
CSS variables
54| Name | Description |
|---|---|
--b-sidebar-border-inline-end | Border between sidebar and calendar |
--b-sidebar-width | The 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. |