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

Show Duration of External Drag and Drop Event

Asked by Chris
4 years ago.

Hi,

Is it possible to show the duration (on drag start) of an external drag and drop item onto the scheduler?

I have been using the HTML5 example here: https://code.daypilot.org/63946/javascript-scheduler-dragging-items-from-desktop

My use case is that I want to drag unscheduled items from one browser window into another browser, that is displaying the scheduler. Whilst I can calculate the correct event end time in the drop event, it would be very useful as a visual reminder to show the duration during the drag event. This would also stop events being dropped onto times where their duration would exceed what is available.

Many thanks,

Chris.

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

This example uses the generic HTML5 drag and drop API and that doesn't allow reading the source object properties until drop. So unfortunately, this is not possible.

If you use the built-in external drag and drop support it will display the duration but it doesn't allow dragging items from another browser window:

https://doc.daypilot.org/scheduler/external-drag-and-drop/

Comment posted by Chris
4 years ago.

Hi Dan, thanks for getting back to me so quickly.

I'm using the built-in external drag and drop and it works perfectly, but we also need to popout the (to be scheduled) event list into its own browser window, as this will aid our users workflow (for multi-monitor use).

Can you tell me if this functionality is on the roadmap, or if there might be another way to achieve this effect?

Many thanks,

Chris.

Comment posted by Dan Letecky [DayPilot]
4 years ago.

Hi Chris,

Unfortunately, this is not possible. Browsers don't allow reading the dragged object for security reasons and that prevents reading the duration from the source. We would prefer using the native HTML5 drag and drop API for all external drag and drop but this is a major limitation that makes it impossible.

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