onLightboxButton
Description
Fires when the user clicks a custom button in the lightbox
onLightboxButton: (id: string, node: HTMLElement, e: Event) => void;
Parameters
id- (required) string - the button's idnode- (required) HTMLElement - an HTML element of the clicked buttone- (required) event - a native 'click' event object
Example
scheduler.attachEvent("onLightboxButton", function (id, node, e){
// any custom logic here
});
Related samples
Details
The event fires only for custom buttons at the bottom of the lightbox and doesn't fire for the default or section buttons.
To check whether the lightbox is currently opened or closed, use the lightbox_id property of the state object returned by the getState method. If the lightbox is opened, the method will return the id of the opened event, otherwise 'null' or 'undefined' will be returned:
if (scheduler.getState().lightbox_id){
//the code for the opened lightbox
} else {
//the code for the closed lightbox
}
Related Guides
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.