Subscribing to open/close events for "delete confirmation"-dialogs in ejSchedule.
I have a schedule with appointments and I want to know when the user opens and closes the dialog for confirming deletion of an appointment.
I have both standard and recurring appointments and the dialog that opens seems to be different for the two. As I can gather they are called "#SchedulealertWindow" for basic appointments and "#ScheduleRecurrenceEdit" for recurring.
I've read the documentation about wiring events here: https://help.syncfusion.com/js/wiring-events
And I've tried the following without success:
$("#SchedulealertWindow").on("ejDialogOpen", function () {
console.log('dialog opened.');
});
$("body").on("ejDialogOpen", "#SchedulealertWindow", function () {
console.log('dialog opened.');
});
Is it possible to subscribe to these dialogs that are handled by the Schedule component?
SIGN IN To post a reply.
5 Replies
HB
Hareesh Balasubramanian
Syncfusion Team
October 16, 2019 01:29 PM UTC
Hi Toke,
Greetings from Syncfusion Support.
Based on your requirement we have prepared a sample, using appointmentWindowOpen and beforAppoointmentRemove event and the sample can be viewed from the below sample and UG link for your reference,
Kindly try the above sample, if you have any concerns please revert us back for further assistance.
Regards,
Hareesh
TW
Toke Wivelsted
October 16, 2019 02:11 PM UTC
I have tested your sample and sadly it does not solve my described issue.
None of the four event subscribed in the sample triggers when the deletion dialog is opened/closed.


I want to know when the "delete-confirmation"-dialog is opened and closed.
Images attached for clarity:


VD
Vinitha Devi Murugan
Syncfusion Team
October 17, 2019 12:34 PM UTC
Hi Toke,
Sorry for the inconvenience.
We have achieved your requirement by using create event of the scheduler. Please refer below sample.
|
$("#Schedule1").ejSchedule({
width: "100%",
height: "525px",
currentDate: new Date(2017, 5, 4),
appointmentSettings: {
dataSource: dManager,
id: "Id",
subject: "Subject",
startTime: "StartTime",
endTime: "EndTime",
description: "Description",
allDay: "AllDay",
recurrence: "Recurrence",
recurrenceRule: "RecurrenceRule"
},
create: "onCreate"
});
});
function onCreate(args) {
if (ej.isNullOrUndefined(this._alertWindow) && ej.isNullOrUndefined(this._recurEditWindow)) {
this._renderRecurEditWindow();
this._renderAlertWindow();
}
this._alertWindow.ejDialog({ beforeOpen: "onBeforeOpen", close: "onDialogClose" });
this._recurEditWindow.ejDialog({ beforeOpen: "onBeforeOpen", close: "onDialogClose" });
}
function onBeforeOpen(args) {
console.log('dialog open');
}
function onDialogClose(args) {
console.log('dialog close')
} |
Regards,
M.Vinitha devi
TW
Toke Wivelsted
October 21, 2019 07:44 AM UTC
This is exactly what I needed, thank you.
VD
Vinitha Devi Murugan
Syncfusion Team
October 22, 2019 06:28 AM UTC
Hi Toke,
Thanks for your update.
We are happy to hear that our solution has fulfilled your requirement.
Regards,
M.Vinitha devi
SIGN IN To post a reply.
- 5 Replies
- 3 Participants
-
TW Toke Wivelsted
- Oct 15, 2019 02:16 PM UTC
- Oct 22, 2019 06:28 AM UTC