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 classProperties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of EventDragCreate class, or subclass thereof.
-
Identifies an object as an instance of EventDragCreate class, or subclass thereof.