Hi,
I have not searched to know if that could be done simply, but it could be interesting not to render marked timespans on ignore days columns.
In theory, adding a marked timespan with a width of 100% will not be visible on ignore days scale holder because these last elements have their width set to 0.
In this way, CSS background properties have no effect.
But… if marked timespans contains text (HTML property) then it appears ! At least in the last column if last day(s) is(are) ignored.
To be explicit, on the demo “Highlighting timespans” ( docs.dhtmlx.com/scheduler/sample … spans.html ), the next code will reveal this behavior, by hidding Thursday and Sunday on week view and by adding a timespan on all days.
scheduler.ignore_week = function(date){
if (date.getDay() == 0 || date.getDay() == 4)
return true;
};
scheduler.updateView();
var timespan = scheduler.markTimespan({
days: [0,1,2,3,4,5,6],
zones: [0,560],
html: 'Here'
});
timespan[0].style.backgroundColor = 'red'; // for test, behind
Here we can see the first letter(s) of the html property, between last displayed scale holder and the scroolbar.
It is the native behavior but they are other cases where theses marked timespans can be displayed, if they implements some customization :
- if the marked timespan has a defined “width”. Adding
timespan[0].style.width = '30px';
after the background-color property will display the background-color. It can be seen on last column. - If background of scale holder use transparency, even in the middle of the scheduler the next of an ignored scale holder can be seen under the next displayed scale holder. In addition to previous point (with width) then both text and background will be seen by transparency.
Ideas of solutions ?
- The simplest is probably to automatically add a visibility: hidden on ignored scale holders (in addition to their current width: 0 property), to do the trick.
- The probably lest simple would be to not display/render the marked timespans, especially on the views where ignored days are set (week and month views only, I guess).
I hope this test can be help.