React/TypeScript and Initialization

Hello,

I want to evaluate the Scheduler before buying it, but I don’t get on how to use it with React/TypeScript.

I followed this :

But I don’t find how to write this in typescript, especially the parts with this.schedulerContainer:
scheduler.init (can’t find schedulerContainer in the type properties)
render method (not very familiar with refs and don’t know where this.schedulerContainer comes from)

any tips please ?

Thanks

nevermind… added this:

private schedulerContainer = document.getElementById(“scheduler-container”);

I now face another problem, I want the timeline view.
I get this error:
Error: scheduler.createTimelineView is not implemented. Be sure to add the required extension: ext/dhtmlxscheduler_timeline.js, ext/dhtmlxscheduler_treetimeline.js, ext/dhtmlxscheduler_daytimeline.js

How to do that in React/Typescript ?
Thianks

Hello @David-TS ,
You can add extensions using import, in your app component(scheduler.component.js):

import 'dhtmlx-scheduler/codebase/ext/dhtmlxscheduler_timeline.js';
import 'dhtmlx-scheduler/codebase/ext/dhtmlxscheduler_daytimeline.js';
import 'dhtmlx-scheduler/codebase/ext/dhtmlxscheduler_treetimeline.js';

Example of project structure:

After that you should do 2-4 steps from the following article:
https://docs.dhtmlx.com/scheduler/timeline_view.html

1 Like

Can you try this one -
code sandbox - https://codesandbox.io/s/crazy-kowalevski-gop6sc
git hub url - https://github.com/aryanisml/dhtmlx-scheduler-react-typescript