Hi
I want to display my working hours from 8 to 5 but unable to do it.this is my code which i am using in my page.
[code]gantt.config.columns = [
{name:“text”, label:“Task name”, tree:true, width:180,resize:true, align:“left”},
{name:"start_date", label:"Start time", align: "center" , resize:true, align:"center",width:90},
{name:"end_date", label:"End date", align: "center" , resize:true, align:"center",width:90},
{name:"progress", label:"Progress", align: "center" , resize:true, align:"center",width:70},
{name:"users", label:"Assigned To", align: "center", resize:true, align:"center",width:80},
{name:"duration", label:"Duration", align: "center" , align:"center",width:80},
{name:"add", label:"", width:35 },
];
gantt.config.work_item = true;
gantt.config.correct_work_time = true;
gantt.config.date_grid = "%j-%M-%Y";
gantt.config.scale_unit = "day";
gantt.config.date_scale = "%M %Y";
gantt.config.step=1;
gantt.config.scale_height = 54;
gantt.config.details_on_create = true;
gantt.config.highlight_critical_path = true;
gantt.config.show_progress = true;
gantt.config.skip_off_time = true;
gantt.config.start_date = new Date(2015, 00, 10);
gantt.config.end_date = new Date(2015, 08, 20);
gantt.config.grid_resize = true;
gantt.config.order_branch = true;
gantt.config.sort = true;
gantt.templates.scale_cell_class = function(date){
if(date.getDay()==0||date.getDay()==6){
return "weekend";
}
};
gantt.templates.task_cell_class = function(item,date){
if(date.getDay()==0||date.getDay()==6){
return "weekend"
}
};
gantt.config.duration_unit = "hour";//an hour
gantt.config.duration_step = 1;
gantt.config.subscales=[
{unit:"day",step:1,date:"%j %D"},
{unit:"hour",step:1,date:"%G"}
];
gantt.setWorkTime({hours : [8,17]});//global working hours
gantt.init('sampleGantt');
[/code]