EventTooltip
Feature
A feature which displays a tooltip containing extra information. The tooltip can be triggered by clicking or hovering an event bar element (see showOn).
Configuration options from this feature are used to configure the EventTip instance:
new Calendar({
features : {
eventTooltip : {
tools : {
// Do not show the Delete tool in the tooltip header
delete : false,
// Add a new tool for our own operation
newTool : {
cls : 'b-icon-add',
tooltip : 'Test',
handler() {
console.log(`Test ${this.eventRecord.name}`);
}
}
},
renderer({ eventRecord }) {
return {
text : `From ${DateHelper.format(eventRecord.startDate, 'l')} to ${DateHelper.format(eventRecord.endDate, 'l')}`
},
},
titleRenderer( eventRecord ) {
return {
text : `${eventRecord.name} ${eventRecord.resource.name}`,
className : {
'b-urgent' : eventRecord.isUrgent,
'b-completed' : eventRecord.isCompleted
}
};
}
}
}
})
You can hide tools conditionally:
new Calendar({
features : {
eventTooltip : {
listeners : {
beforeShow({ source }) {
source.tools.delete = false;
}
}
}
}
})
This feature is enabled by default.
Useful configs
| Config | Description |
|---|---|
| showOn | Gesture that activates the tooltip (click, hover) |
| renderer | Custom content renderer function |
| titleRenderer | Custom title renderer function |
| tooltip | Direct config for the tooltip widget |
See also
- EventTip — The tooltip widget displayed by this feature
- ScheduleTooltip — Tooltip for empty schedule areas
- EventEdit — Linked for editing from the tooltip
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
If using
showOn : 'click'(the default), this is the amount of time to delay showing after the click gesture. This may be used if you do not wish the tooltip to appear on the first click of a double click gesture. By default there is no delay, and the tip is shown instantly.Has a corresponding runtime clickDelay property.
-
This config is used to directly configure the associated recurrence confirmation popup used when a delete is requested.
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of EventTooltip class, or subclass thereof.
-
If using
showOn : 'click'(the default), this is the amount of time to delay showing after the click gesture. This may be used if you do not wish the tooltip to appear on the first click of a double click gesture. By default there is no delay, and the tip is shown instantly.Has a corresponding clickDelay config.
-
The event which the tooltip feature has been activated for.
-
Gets the Tooltip instance that this feature is using.
Has a corresponding tooltip config.
-
Identifies an object as an instance of EventTooltip class, or subclass thereof.