Hi JMEL Becha,
Greetings from Syncfusion Support.
We have prepared a sample to prevent the closing of editor window if the subject of the event is New for your reference which can be viewed from the following link. In the shared code, this.cancel is undefined as here dialog instance is available in ‘this’. So we have stored it in separate variable in actionBegin and assign that variable in beforeClose event.
onActionBegin(args: ActionEventArgs): void {
if (args.requestType === 'eventCreate' || args.requestType === 'eventChange') {
var subject = (args.requestType === 'eventCreate') ? args.data[0].Subject : (args.data as any).Subject;
if (subject == 'New') {
args.cancel = true;
this.cancel = true;
let val = this.cancel;
this.scheduleObj.eventWindow.dialogObject.beforeClose = function (args) {
args.cancel = val;
alert("Don't Close the Appointment Window");
}
this.cancel = false;
}
}
}
Please try the sample at you end and let us know if you need any further assistance.
Regards,
Nevitha.