Skip to main content

date_grid

Description

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

date_grid: string

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

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.