AddMarkedTimeSpan and Mark now not working in timeline view dhtmlx


#1

Marked timespan and mark now do not work in timeline view. I tried to reproduce this issue.
http://snippet.dhtmlx.com/5/ff8905fb9


#2

Hello @dlnatn ,

The issue in your case occurs because of two reasons:

  1. You should add the limit.js extension before the timeline.js extension, or it won’t work, here is an example:
<script src="https://docs.dhtmlx.com/scheduler/codebase/ext/dhtmlxscheduler_limit.js"></script>
<script src="https://docs.dhtmlx.com/scheduler/codebase/ext/dhtmlxscheduler_timeline.js"></script>
  1. The second, is that CSS parameter should contain class instead of direct CSS rules:
// CSS
<style>
  .someClass{
    background-color: red;
    opacity: 0.25;
    filter: alpha(opacity = 25);
  }

</style>
// JS
scheduler.addMarkedTimespan({// Vardiya gölgeleri için
  start_date: new Date(),
  end_date: new Date(2021, 3, 10, 12),
  css: "someClass",
});

Here is the corrected demo:
http://snippet.dhtmlx.com/5/b7b986351