scale_cell_class

specifies the CSS class that will be applied to cells of the time scale of the timeline area

Parameters

dateDatethe date of a cell

Example

<style>
.weekend{ background: #f4f7f4 !important;}
</style>
gantt.templates.scale_cell_class = function(date){
    if(date.getDay()==0||date.getDay()==6){
        return "weekend";
    }
};

Related samples

Details

Note that while using work time calculations, you can use isWorkTime instead of hardcoded values:

gantt.config.work_time = true;
 
gantt.templates.scale_cell_class = function(date){
   if(!gantt.isWorkTime(date))
      return true;
};
See also
Back to top