The makeDraggableAsRow() method activates an external element so it can be dragged to the JavaScript Scheduler component as a row.
This method is static. Call it using the full prefix, not on a DayPilot.Scheduler class instance.
Available since 2024.4.6270.
DayPilot.Scheduler.makeDraggableAsRow(options)options.data - the source data object
options.element (DOM element) - the element to activate for drag and drop
options.remove (DOM element) - the element to remove on drop; if not specified, options.element is used
options.keepElement (boolean) - set to true if the original element should not be removed from the DOM on drop; optional
The source data object (options.data) requires the following properties:
id (string | number) - resource ID
name (string) - resource name
See External Drag and Drop of Rows for the full workflow.
Assuming the page contains <div id="item" data-id="1">Draggable item</div>:
const element = document.getElementById("item");
DayPilot.Scheduler.makeDraggableAsRow({
element,
data: {
id: element.getAttribute("data-id"),
name: element.innerText
}
});External Drag and Drop of Rows [doc.daypilot.org]