v7.3.0

ScheduleMenu
Feature

A feature which adds a context menu to the unoccupied parts of calendar views.

There is one predefined item provided by default:

  • addEvent Adds 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

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class

Properties

Properties are getters/setters or publicly accessible variables on this class
id: scheduleMenu

Source path

Calendar/feature/ScheduleMenu.js

Demo

examples/custom-menus

Contents