Customer Deleted Event

We have deleted items by occurrence instead of date. We defined our own scheduler.repeat_date in our own dhtmlxscheduler_recurring.custom.js. We are moving this to angular, and are having trouble getting the custom js file to load and seen by angular. I was able to get it to load by this

    const script = this.renderer.createElement('script');
    script.src = '../../../assets/dhtmlxscheduler_recurring.custom.js';
    script.onload = () => {
      console.log('script loaded');
    };
    this.renderer.appendChild(this.el.nativeElement, script);

but it didn’t seem to get picked up and we were seeing the default deleted recurring handler.

Any ideas on how to accomplish this?

Thanks,
Larry

Hello @Larry,

Just as a clarification, this recurring.custom worked by default and stopped from work in angular app, or didn’t work from the start?

In the first case, it’s hard to suppose what exactly goes wrong, as I don’t know which changes you made, and so can’t suppose why they didn’t apply - because of some incorrect implementation, or were rewritten by scheduler. You can try to console log the changed methods in order to check if they were changed to custom ones or not. Technically, you should be able to redefine scheduler methods in a way you need.

If it stopped from work after trying to use in angular, it may be connected with some specific angular details of work, unfortunately I’m not specialized in it and can’t give you direct suggestions.
But as one of possible solutions, you can try to add this custom file as angular.json script:
Adding, Loading, and Using JavaScript in Angular | by Codeible | Medium.

If nothing helps, you still can change the scheduler sources and apply your changes there(unfortunately, in this case you will have to reapply them on each scheduler update).

Kind regards,