AddMarkedTimeSpan and Mark now not working in timeline view dhtmlx

Marked timespan and mark now do not work in timeline view. I tried to reproduce this issue.

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=""></script>
<script src=""></script>
  1. The second, is that CSS parameter should contain class instead of direct CSS rules:
// CSS
    background-color: red;
    opacity: 0.25;
    filter: alpha(opacity = 25);

// 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:

1 Like