Drag n drop

Hi,

I am saving an event at particular time. Now I am dragging the same event to another time and date. The new time and date is automatically being detected by the event. But the second event is not getting saved in the database automatically. The edit popup is required to open and have to click save from there, in order to save the second event.

I want that the save should be automatically done after the event is being dragged to other time.
How can I do that?

This is default behavior. Any change of event’s property ( by dnd or through lightbox ) will trigger data saving.

Saving may be broken by

  • custom code , which is attached to event handlers
  • incorrect server side response for first saving command

Thank for your reply.

But see the actual scenario,
I have a save() method which is called from dhtmlxscheduler.js and it saves the event created by the user. Please refer to the screenshot where I have show the different save buttons using which the save() method is called.



Now, my requirement is that the save() method should be instantiated automatically when any sort of drag n drop operation is done. How to do this?

Event moving will trigger onEventAdded or onEventChanged inner events.
So you can attach a custom code to both of them and call save() from it.