close lightbox

Hi

   How can i close a lightbox without press cancel button?
   How can i avoid opening on lightbox by click on edit?

a) endLightbox API
docs.dhtmlx.com/scheduler/api__s … htbox.html

b) return false from onBeforeLightbox event
docs.dhtmlx.com/scheduler/api__s … event.html

Hi

obBeforeLightbox   return false event attached to mouse pionter,event dont save not letting other to click

You can add check in onBeforeLightbox. Use getState api to detect is this a lightbox for newly created event, or an edit attempt.
docs.dhtmlx.com/scheduler/api__s … state.html

You can allow lightbox for new event and block for edit operations.

But how do I close the lightbox when other cell is clicked?

You can use endLightbox function in your click handler.
docs.dhtmlx.com/scheduler/api__s … htbox.html

Sten,
Thanks for your reply.
I can not able to call endLighbox handler because when light box is opened I can not able to click anywhere in the screen. Lightbox gives light gray area to entire screen and I can not able to click anywhere excpet light box. So how can I do this?

And also by pressing ESC key should hide the lightbox but how to attached esc key with that?

Thank you.

If you want hide light gray area you can use hideCover function. docs.dhtmlx.com/scheduler/api__s … cover.html

For example:
scheduler.attachEvent(“onLightbox”, function (id){
scheduler.hideCover();
});

By default lightbox closes with ESC button.
docs.dhtmlx.com/scheduler/api__s … other.html