Reputation: 2205
In Dhtmlx Scheduler Timeline View, how can I set the Hour header from military time(24hour) to 12-hour format?
I have found some responses on their forum but this doesnt seem to work.
scheduler.config.hour_date = "%h:%i %A";
Any help would be appreciated. Thanks!
Upvotes: 0
Views: 1534
Reputation: 2205
Here's the complete solution for MVC that I used.
var timeline = new TimelineView("timeline", "EmployeeId");
timeline.X_Date = "%h:%i %A";
Upvotes: 1
Reputation: 1656
Hour format must be specified in timeline configuration object with x_date property. Here is the example:
scheduler.createTimelineView({
name: "timeline",
x_unit: "hour",
x_date: "%h:%i %A",
x_step: 1,
x_size: 24,
y_unit: [
{key:1, label:"James Smith"},
{key:2, label:"John Williams"},
{key:3, label:"David Miller"},
{key:4, label:"Linda Brown"}
],
y_property: "section_id",
render:"bar"
});
Upvotes: 3