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

EventMoveHandling=javascript?

Asked by Kevin Fauver
10 years ago.

As I was trying to call javascript during the callback of DayPilotMonth1_EventMove in every imaginable way possible and failing each time. The point of it is to open a popup to set some details of the move (its a request for day switching). I am trying to work around that to accomplish the same thing. So I was wondering if it is possible that EventMoveHandling can be handled by javascript. If so, how to I call my JS function "function eventMove(OldStart,NewEnd)"? When I tried "OnEventMoveHandlingJavaScript="eventMove(OldStart, NewEnd);" i get a popup saying "event with id x moved"...which tells me its calling SOMETHING but i dont know what in order to manipulate it. Thank you in advance!

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

Kevin, You can try this:

EventMoveJavaScript="eventMove(e.start(), newEnd)"

In this event handler the following variables are available:

* e - DayPilot.Event object
* newStart - DayPilot.Date object
* newEnd - DayPilot.Date object
* ctrl - boolean
* shift - boolean
* position - integer

See also http://api.daypilot.org/daypilot-month-oneventmove/ (api1)

Comment posted by Kevin Fauver
10 years ago.

Thank you!! I see what I was doing wrong. Appreciate it!

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