You can specify custom group size and date/time format for the time header rows.

The result time header HTML can be further customized using BeforeTimeHeaderRender event.

Group Sizes (GroupBy)

Supported group sizes (and the default format string):

Hour

Default date/time format pattern: "H"

Day

Default date/time format pattern: the format string specifed using datePattern property of the current locale, "M/d/yyyy" for Locale.US

Week

Default string: ISO week number if the week starts on Monday, otherwise the US week number

Month

Default date/time format pattern: "MMMM yyyy"

Quarter

Date/time format example: "Q1"

Year

Default date/time format pattern: "yyyy"

None

A single cell, uses an empty string.

Cell

Cell size corresponds to the cell duration.

Default

Uses the value defined using CellGroupBy property. This is a legacy option.

JavaScript

Example:

dp.timeHeaders = [
  { groupBy: "Year" },
  { groupBy: "Month" },
  { groupBy: "Day" }
];

Tutorials