타임라인 영역 내 셀에 적용되는 CSS 클래스를 정의합니다.
item | Task | object | 행과 연결된 작업 또는 리소스 객체 |
date | Date | 셀의 특정 날짜 |
<style>
.weekend{ background: #f4f7f4 !important;}
</style>
gantt.templates.timeline_cell_class = function(task,date){
if(date.getDay()==0||date.getDay()==6){
return "weekend";
}
};
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";
};