Templates of Tooltips
gantt.templates = {
tooltip_date_format: '指定工具提示中显示的开始和结束日期的格式',
tooltip_text: '指定工具提示的文本'
}
用法:
tooltip_date_format: 指定工具提示中显示的开始和结束日期的格式
/**
* @param date:Date 需要格式化的日期
*/
gantt.templates.tooltip_date_format = function (date) {
return gantt.date.date_to_str("%Y-%m-%d %H:%i")(date);;
};
tooltip_text: 指定工具提示的文本
/**
* @param start:Date 任务计划开始的日期
* @param end:Date 计划完成任务的日期
* @param task:object 任务对象
*/
gantt.templates.tooltip_text = function (start, end, task) {
return "tooltip_text";
};