Skip to main content

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 id
  • mode - (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", function (id, mode, e){
//any custom logic here
return true;
});

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 ( 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.