Drag&drop from an external source
18 years ago.
Dear Dan!
Where can I find some code example about using this feature?
Thank you
Dear Dan!
Where can I find some code example about using this feature?
Thank you
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
DayPilotCalendar.dragStart(elementToBeRemoved, durationInSeconds,After dropping the object the standard EventMove event is triggered (handling specified by EventMoveHandling). If you decide to handle it on the client side using JavaScript, you can detect the external source by checking the external variable (external is false when the event was dragged from another location inside the calendar):
valueToBePassedToMoveEvent, textToBePassedToMoveEvent);
EventMoveJavaScript="if (external) { alert('External drag&drop detected.'); }
dpc1.eventMoveCallBack(e, newStart, newEnd, oldColumn, newColumn);"I am trying to drag from one DayPilotMonth (monthview) control to another.
None of the techniques seem to work. Both ServerSide and Client-side events seem to fire on the Source control not the target. The focus rectangle DOES move outside to the target control, but it also stays within the Source control, and events only fire against the source. I have tried PostBack, CallBack and Javascript handling, and all 3 seem to have the same fault.
Any help appreciated.
Thanks in advance.
Simon Edwards
mailto:coding(REMOVEME)@(ANDME)controlbox.co(ANDMETO).uk
OK, we might use the scheduler instead, so everything will be inside one control.
Thanks for the prompt response.
This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.
DayPilot