grid_date_format
Description
定义在显示日期值的列中日期的显示方式(返回Date值)
grid_date_format: (date: Date, column?: string) => string;
Parameters
date- (required) Date - 需要格式化的日期column- (optional) string - 触发模板的列名
Returns
text- (string) - 将在甘特图中显示的html文本
Example
gantt.templates.grid_date_format = function(date, column){
return gantt.date.date_to_str(gantt.config.date_grid)(date);
};
Details
此模板函数会被调用于所有任务,除了那些未排程的任务。
注释
grid_date_format 模板仅被 date_grid 模板使用,因此此处的任何修改也会影响 grid_date_format。
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.