date_grid
Description
定义在显示日期(返回 Date 值)的列中展示的内容,这些列位于 grid 中
date_grid: (date: Date, task: Task, column: string) => string;
Parameters
date- (required) Date - 要格式化的日期值task- (required) Task - 与日期相关联的任务对象column- (required) string - 调用模板的列名
Returns
text- (string) - 将在 gantt 中显示的 html 文本
Example
gantt.templates.date_grid = function(date, task, column){
if(task && gantt.isUnscheduledTask(task) && gantt.config.show_unscheduled){
return gantt.templates.task_unscheduled_time(task);
}else{
return gantt.templates.grid_date_format(date);
}
}
Related samples
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.