Copy an event based on custom property

Hello,

When a new event is created, if a custom lightbox checkbox is true, I would like to make a copy of it, with different start_date and end_date.

Probably I should modify the “addEvent” method, but the question is: How could access the custom checkbox value at that moment?

Any other idea?

Thx for your help!

By defautl, it expected that during custom lightbox closing you will send all info from the custom lightbox back to scheduler, something like

scheduler.getEvent(id).my_value = checkbox.checked;

In such case you can use onEventAdded action.

scheduler.attachEvent("onEventAdded", function(id, ev){ if (ev.my_value) do_something(); return true; });

It works!!
Thanks a lot! :wink: