timeline_cell_class

타임라인 영역 내 셀에 적용되는 CSS 클래스를 정의합니다.

itemTask | object행과 연결된 작업 또는 리소스 객체
dateDate셀의 특정 날짜

Example

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

Related samples

Details

work time 계산을 할 때는 고정 값 대신 isWorkTime를 사용하는 것이 좋습니다:

gantt.config.work_time = true;
 
gantt.templates.timeline_cell_class = function(task,date){
    if(!gantt.isWorkTime({task:task, date:date}))
        return "weekend";
};
See also
Back to top