How to get current start_date onBeforeLightbox


    How can i able to get  current start_date [b]onBeforeLightbox[/b] for recurring event(i.e clicked event date not recurring start_date)

“onBeforeLightbox” receives the ID of the event as parameter, so you can use:


to get the start date of the series or an occurrence (depending on the button clicked - “Edit series” or “Edit occurrence”).


Actually i am checking, if current date and time over i am using 

"onBeforeEventChanged "

		           return true;

I am getting error in console
TypeError: b is undefined
b.rec_type && this._lightbox_id && this._roll_back_dates(b);

it’s a quite unusual set of methods for “onBeforeEventChanged” event. When you clear all events from the scheduler it can not perform all internal operations with the event, it causes errors. What do you need to do if current date and time is over ?

Also, the API was designed to use public methods to work with the component … ml#methods
It’s better to avoid to use internal methods like “scheduler.render_view_data(), scheduler.update_view()”, etc.


“What do you need to do if current date and time is over ?”

I dont want open light box if current time over and draging should not allow,and editing time before current date time should not allow to save.

you can return “false” and all drag changes will be cancelled:

scheduler.attachEvent("onBeforeEventChanged", function(ev, e, is_new){ if (current time over) // you condition check the time return false; // the lightbox will not pop up, the changes will be cancelled else return true; }); … event.html