ScheduleMenu
Feature
A feature which adds a context menu to the unoccupied parts of calendar views.
There is one predefined item provided by default:
addEventAdds an event at the time point indicated by the click
If the timepoint has only date-level granularity (Such as when clicking in a MonthView or AgendaView, or YearView), the start time of the event will default to the configured autoCreate's startHour property.
If the EventEdit feature is enabled, the new event is passed for editing.
The items set can be reconfigured by providing an items property to this feature:
features : {
scheduleMenu : {
items : {
// Knocks out the predefined addEvent item
addEvent : null,
// Add our own custom item
disableDate : {
icon : 'fa fa-calendar-times',
text : 'Mark date unavailable',
// Will look up ownership chain and find the Calendar
handler : 'up.makeDateUnavailable'
}
}
}
},
makeDateUnavailable({ date }) {
// Pass to our own app logic
this.disableDate(date);
}
This feature is enabled by default.
Useful configs
| Config | Description |
|---|---|
| items | Menu item definitions (add, remove, or customize) |
| triggerEvent | DOM event that opens the menu (contextmenu, click, dblclick) |
| processItems | Dynamically modify items before showing |
See also
- EventMenu — Context menu for events
- EventEdit — Feature for editing newly created events
- EventCopyPaste — Adds paste items to this menu
No results
Configs
Configs are options you supply in a configuration object when creating an instance of this classProperties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of ScheduleMenu class, or subclass thereof.
-
Identifies an object as an instance of ScheduleMenu class, or subclass thereof.