onBeforeDrag
Description
Fires when the user starts the drag/resize operation (version 2.1+)
onBeforeDrag: (id: string, mode: string, e: Event) => boolean
Parameters
id- (required) string - the event's idmode- (required) string - the dragging mode: "move","resize" or "create"e- (required) Event - a native event object
Returns
result- (boolean) - defines whether the default action of the event will be triggered (true) or canceled (false)
Example
scheduler.attachEvent("onBeforeDrag", (id, mode, e) => {
// any custom logic here
return true;
});
Related samples
Details
The event fires when the user clicks inside the Scheduler on the element that can be dragged.
For the "create" mode, the id value is not provided, because a new event is not created yet.
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.