timeline_cell_class
Description
타임라인 영역 내 셀에 적용되는 CSS 클래스를 정의합니다.
timeline_cell_class: (item: any, date: Date) => string | void;
Parameters
item- (required) Task - | object 행과 연결된 작업 또는 리소스 객체date- (required) Date - 셀의 특정 날짜
Returns
text- (string | void) - 주어진 item에 대한 CSS 클래스 이름
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";
};
Related API
Related Guides
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.