Skip to main content

timeFormat

Description

Optional. Defines the format of time in the spreadsheet

Usage

timeFormat?: number;  // 12 | 24

Default config

timeFormat: 12

Example

const spreadsheet = new dhx.Spreadsheet("spreadsheet", {
timeFormat: 24,
// other config parameters
});

spreadsheet.parse({
styles: {
// a set of styles
},
data: [
{ cell: "A1", value: "18:30", format: "time" },
{ cell: "A2", value: 44550.5625, format: "time" },
{ cell: "A3", value: new Date(), format: "time" },
]
});

Change log: Added in v4.3

Related articles: Time format