search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Using DayPilot.Calendar.makeDraggable and native drag/drop on the same html element

Asked by Sandor
3 years ago.

I am using DayPilot.Calendar.makeDraggable to drag an external item onto the DayPilot calender and this works great! But, I also need to be able to drop this on a droptarget (div) that is not DayPilot.

How can I achieve this?

I tried adding native drag/drop on the same element but only the DayPilot drag/drop works. If i turn off the DayPilot makeDraggable the native drag/drop works.

Answer posted by Dan Letecky [DayPilot]
3 years ago.

Unfortunately, the makeDraggable() method can't be combined with the native HTML5 drag and drop API.

However, there is now a new registerDropTarget() method available in the latest sandbox build (2021.3.5096) that lets you register a custom element as a drop target.

Please see the following tutorial for an example:
https://code.daypilot.org/90296/javascript-calendar-custom-drop-target-for-external-items

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.