v7.3.0

EventDragCreate
Feature

Feature that allows the user to create new events by dragging in empty parts of the scheduler rows.

This feature is enabled by default.

Incompatible with the EventDragSelect and Pan features. If either of those features are enabled, this feature has no effect.

Conditionally preventing drag creation

To conditionally prevent drag creation for a certain resource or a certain timespan, you listen for the beforeDragCreate event, add your custom logic to it and return false to prevent the operation from starting. For example to not allow drag creation on the topmost resource:

const scheduler = new Scheduler({
    listeners : {
        beforeDragCreate({ resource }) {
            // Prevent drag creating on the topmost resource
            if (resource === scheduler.resourceStore.first) {
                return false;
            }
        }
    }
});

Useful configs and functions

Member Description
beforeDragCreate Fires before drag-create starts
dragCreateStart Fires when drag-create begins
beforeDragCreateFinalize Async finalizer before creation completes
dragCreateEnd Fires when drag-create ends
afterDragCreate Fires after event is created
lockLayout Lock row layout during drag-create

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

Functions

Functions are methods available for calling on the class

    Events

    Events are triggered for certain actions in this class and can be listened for to react to those actions in your code

    Event handlers

    Event handlers are callbacks called as a result of certain actions in this class
    id: eventDragCreate

    Source path

    Scheduler/feature/EventDragCreate.js

    Demo

    examples/basic

    Contents