Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a method to cancel/close edit modal manually #44

Open
RenishDadhaniya06 opened this issue Oct 2, 2019 · 3 comments
Open

Provide a method to cancel/close edit modal manually #44

RenishDadhaniya06 opened this issue Oct 2, 2019 · 3 comments

Comments

@RenishDadhaniya06
Copy link

RenishDadhaniya06 commented Oct 2, 2019

I have on condition on save. So i am opening confirmation modal & want to save data on the confirmation.

But as modal popup opens i don't have control over edit modal. So on yes i want to close edit modal.

this.schedularSaveEvent = scheduler.attachEvent("onEventSave", (id, event) => {  
    const hours = Math.abs(event.end_date - event.start_date) / 36e5;
    if (hours > 24) {
        this.showModal24Hours = this.modalService.show(this.scheduler24Hourse);
    } else {
        return true;
    }
});

okModalClick() {
////hide schedular edit modal
}

Is there any method that allows to close edit modal?

@AlexKlimenkov
Copy link
Contributor

Hi!

Please check out the latest v5.3.1, it's been published just now.
we've added scheduler.hideLightbox() method to the public api
https://docs.dhtmlx.com/scheduler/api__scheduler_hidelightbox.html

Is that what you've meant?

@RenishDadhaniya06
Copy link
Author

It's Partially Resolved My Issue but now it's call onEventDeleted while hideLightbox.
Any Resolution around that

@ArtiBorisevich
Copy link

Hello,
If I understand you correctly, you want to close the lightbox (edit modal) without deleting your event. One of the options is to use endLightbox method with true value. There is an article about it:
https://docs.dhtmlx.com/scheduler/api__scheduler_endlightbox.html
Please check the following example: http://snippet.dhtmlx.com/5/fc0c5db6f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants