I am working on an Angular project and I have upgraded to version 6.0.1 of DHTMLX. I want to implement the desctuctor in order to close properly a modal with a scheduler.
If it’s necessary to implement DataProcessor, in the documentation following, there is a lack a definition for CalendarEventService. How we are supposed to use CalendarEventService ?
If it’s necessary to implement DataProcessor, in the documentation following, there is a lack a definition for CalendarEventService. How we are supposed to use CalendarEventService ?
CalendarEventService is a class that can be used to provide the scheduler with events. There is an article of dhtmlxScheduler and Angular integration where you can find the possible way of its implementation: https://dhtmlx.com/blog/angular-dhtmlxscheduler-tutorial/
Destructor itself doesn’t seem to call the error,
I can create and destroy the instance of the Scheduler without an error:
var tempScheduler = Scheduler.getSchedulerInstance();
tempScheduler.destructor();
The error however will happen if you try to call setCurrentView or updateView of the scheduler that is already destroyed:
var tempScheduler = Scheduler.getSchedulerInstance();
tempScheduler.destructor();
tempScheduler.setCurrentView();
// script error:
// Uncaught Error: The scheduler is not initialized.
// **scheduler.updateView** or **scheduler.setCurrentView** can be called only after **scheduler.init**
I’m not sure whether the stack trace starts from a some place in your code or from some handler in dhtmlxscheduler.js.
Is there any text below the last line at dhtmlxscheduler.js:35:319922 ?
If the stack trace starts from dhtmlxscheduler.js, the error may be caused by one of the activated plugins (and this would mean a bug we could fix quickly).
We only need to know what plugin and what settings to test.
You can either disable plugins one by one until you find one that causes the problem or do a quick debug session: