scheduler icon indicating copy to clipboard operation
scheduler copied to clipboard

Provide a method to cancel/close edit modal manually

Open RenishDadhaniya06 opened this issue 6 years ago • 3 comments

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?

RenishDadhaniya06 avatar Oct 02 '19 12:10 RenishDadhaniya06

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?

AlexKlimenkov avatar Oct 02 '19 14:10 AlexKlimenkov

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

RenishDadhaniya06 avatar Oct 03 '19 13:10 RenishDadhaniya06

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

ArtiBorisevich avatar Dec 29 '21 15:12 ArtiBorisevich