DayPilot.Gantt.timeHeaders

Array that specifies the time headers: levels, groups, and date format.

Declaration

DayPilot.Gantt.timeHeaders (array)

Description

Item properties:

  • groupBy (string; group size)
  • format (string; date/time format; optional)

groupBy values:

  • "Default" - uses the value specified in cellGroupBy (used for backwards compatibility)
  • "Cell" - uses a group size corresponding to cell size defined using scale
  • "Hour"
  • "Day"
  • "Week"
  • "Month"
  • "Year"
  • "None"

format values:

See DayPilot.Date.toString() pattern variables.

Default value

[ 
  { "groupBy": "Month", "format": "MMMM yyyy"}, 
  { "groupBy": "Day", "format": "d"} 
]

Example

gantt.timeHeaders = [
  { groupBy: "Month", format: "MMMM yyyy" },
  { groupBy: "Day", format: "d"},
  { groupBy: "Hour", format: "h"}
];