date_grid

sets the format of dates in the "Start time" column of the table

string date_grid;

Example

gantt.config.date_grid = "%d/%m/%Y";
 
gantt.init("gantt_here");


Default value:

"%Y-%m-%d"
Details

To change the grid_date config dynamically (for instance, after a user changes the locale language), you need to redefine the grid_date_format template:

function change_grid_date(){
  gantt.config.date_grid = "%d.%m.%Y";
  gantt.render()
}
gantt.templates.grid_date_format = function(date, column){
  return gantt.date.date_to_str(gantt.config.date_grid)(date);
};

Related sample: Changing date in grid dynamically

See also
Back to top