DHTMLX Scheduler and Angular 6

Hi,

I implemented the scheduler in an Angular 6 application following the tutorial at https://dhtmlx.com/blog/angular-dhtmlxscheduler-tutorial/ and I am facing 2 major issues:

  1. The import statement import {} from “@types/dhtmlxscheduler”; returns an error saying:
    File ‘……/node_modules/@types/dhtmlxscheduler/index.d.ts’ is not a module.
    I commented this part and the scheduler is rendered, however not sure whether this will impact some functionality which I have not implemented yet.

  2. The ng build process also returns an error:
    ERROR in src/app/components/admin/scheduler/scheduler.component.ts(20,5): error TS2304: Cannot find name ‘scheduler’.
    when scheduler is being used like so:
    scheduler.config.xml_date = “%Y-%m-%d %H:%i”;

So is this scheduler for Angular ready or it is still a work in progress?

Here you can find a ready demo for the dhtmlxScheduler in an Angular 6 in the attachment:
angular-demo.zip (121.0 KB)

Hello,this could help anyone who works with Angular 7
In Tsconfig.app.json you add this :

“compilerOptions”: {
“outDir”: “…/out-tsc/app”,
“types”: [“dhtmlxscheduler”]
},
it will make the @type of dhtmlxscheduler load into the component and in your component you simply import
import ‘dhtmlx-scheduler’;

Hope this will help.

1 Like

This helps for Angular 6, thank you very much!