markTimespan sections in timeline view

Hello.

I was having problems when using markTimespan in timeline view.

Not only would it mark every section, but it would mark every section a number of times equal to the number of defined sections.
(Ex.: sections{timeline: [1,2,3]} would mark every section 3 times).

I have been using

scheduler.markTimespan({
  days: 2,
  zones: "fullday",
  css: 'gray',
  sections: {
    timeline: [1,3]
  }
});

This can also be reproduced in ‘/samples/03_extensions/25_advanced_limitation.html’.

After messing with the source for a while I ended up just replacing

f.hasOwnProperty(k)&&(e.push(k),i.push(d._scales[k]))

for

f.hasOwnProperty(k)&&(!(a.sections&&a.sections.timeline)===!(a.sections&&a.sections.timeline&&a.sections.timeline==k))&&(e.push(k),i.push(d._scales[k]))

in ‘\codebase\ext\dhtmlxscheduler_timeline.js’ since it doesn’t seem to be checking for sections there.

Should I just stick with this solution for now or is there something I’m missing?

Hello,
we’ve confirmed a bug in .markTimespan in timeline view, fix will be ready in the nearest time.
For now try using scheduler.addMarkedTimespan instead, it does not have such issue

Has this bug been fixed yet? I’m trying to do the same thing.

Thanks

Please try to use the attached js file instead of the original one.
dhtmlxscheduler_timeline.fix.zip (7.48 KB)