DayPilotCalendar supports drag&drop from an external source (from outside of the calendar control).
This feature is useful for implementing the following scenario:
- The calendar shows current time schedule.
- Separate list of events that are not yet scheduled.
- The unscheduled events can be dragged to the calendar.
You should activate the element to be dragged by adding the following attribute:
onmousedown='return DayPilotCalendar.dragStart(this.parentNode, 60*30, "123", this.innerHTML);'
It's better to add it to an inline element (<span>) rather than a block element (<div>, <li>) because block elements would become drag-sensitive in all the width (100%) and not just on the text
The dragStart parameters are as follows:
DayPilotCalendar.dragStart(elementToBeRemoved, durationInSeconds, valueToBePassedToMoveEvent, textToBePassedToMoveEvent);
- Drag & drop from a TextBox or Grid (DayPilot Forums)
- Drag & drop with dynamic events (DayPilot Forums)
- Say we have drag & drop component ... (DayPilot Forums)
- How to prevent event overlapping (KB)
External drag&drop can be detected using "external" variable: