Skip to main content

grid_date_format

Description

Specifies the format of dates for the columns that show dates (return the Date values)

grid_date_format: (date: Date, column?: string) => string;

Parameters

  • date - (required) Date - the date which needs formatting
  • column - (optinal) string - the name of the column that called the template

Returns

  • text - (string) - html text which will be rendered in the gantt

Example

gantt.templates.grid_date_format = function(date, column){
return gantt.date.date_to_str(gantt.config.date_grid)(date);
};

Details

The template function is called for all tasks, except for the unscheduled ones.

note

The grid_date_format template is used only by the date_grid template, so if you make some changes in it, grid_date_format will be affected.