0

i have injected the Schedulerplugin into the view using this tutorial I have also included the necessary files.

the plugin is working and i have the scheduler in my view. The problem is that i cant figure out how to add the timeline view. I have the license for it and all.

I have tried this tutorial but I can't seem to get anyway with it. I've put the scheduler.createTimelineView into the directive from first link. But i get error "scheduler.createTimelineView is no a function".

I have also tried this SO-answer but no luck. Anyone know what to do here?

kirkegaard
  • 1,058
  • 2
  • 12
  • 32

1 Answers1

1

But i get error "scheduler.createTimelineView is no a function".

Usually, this indicates that timeline extension hasn't been added to the page. Make sure to add ext/dhtmlxscheduler_timeline.js to the page right after dhtmlxscheduler.js, i.e.

<script src="lib/scheduler/dhtmlxscheduler.js"></script>
<script src="lib/scheduler/ext/dhtmlxscheduler_timeline.js"></script>
Alex Klimenkov
  • 956
  • 1
  • 5
  • 8
  • Allright. So that works now, but i'm not able to initially add events now - they simply won't render. Only able to create them in the app. – kirkegaard Aug 23 '17 at 08:46
  • It can be caused by the format of start_date/end_date dates in your data feed - it must match format set in `scheduler.config.xml_date`. You can check the state of the scheduler after you load data to see if that's the case. Execute either `scheduler.getEvents()` or `scheduler._events` in browser console - if you'll get some events and they'll have obviously incorrect dates (1970s or so) - you can be sure that's it. And a fix - change either xml_date or a format of dates in your data feed. https://docs.dhtmlx.com/scheduler/api__scheduler_xml_date_config.html – Alex Klimenkov Aug 23 '17 at 09:22