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

Reset "args" data in "onEventMoved"

Asked by Shivprasad Acharya
6 months ago.

I have 2 scheduler.
$scope.dp = new DayPilot.Scheduler("dpchart");
$scope.dpc = new DayPilot.Scheduler("dpcalendar");
for chart & Calendar with external drag and drop support.

When I'm doing drag & drop from chart to calendar I'm calling
"$scope.dpc.onEventMoved = function (args) {}" for calendar.

when I drag and drop one instance from chart to calendar,
I need to do validation on "args" data (ex: args.e.start().value ) and if validation fails I need to delete the dragged instance from the calendar using "events.remove" method.

My problem is I dragged & dropped an instance from chart to calendar to "11:00 AM" slot and (args.e.start().value) had value of "11:00 AM" and I deleted the slot from the calendar, and I dragged & dropped the same instance again to "06:00 PM" and (args.e.start().value) had value of "11:00 AM" instead of "06:00 PM".

How to reset the "args" data in "onEventMoved" method each time when i do drag and drop.


Comment posted by Dan Letecky [DayPilot]
6 months ago.

There is something weird going on when you drag the same event the second time to another Scheduler instance. I'm checking the problem.

Answer posted by Dan Letecky [DayPilot]
6 months ago.

This issue should be fixed now in the latest sandbox build (8.3.2841):

Let me know if the problem persists.

Comment posted by Shivprasad Acharya
5 months ago.

It actually solved my problem but created another one.

When I load the page for the first time all works fine but when I drag an instance from chart to calendar, "onBeforeEventRender" method of chart receives "args" arguments data which is empty. So it will give an error.

Comment posted by Dan Letecky [DayPilot]
5 months ago.

This problem should be fixed now (build 8.3.2846) as well:

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