I create a Timeline with the following code:
[code]var objects = [{ key:“1”, label:“Object 1”}, { key:“2”, label:“Object 2”}];
var timelineConfig = {
name: “timeline”,
render: “bar”,
x_unit: “day”,
x_date: “%d”,
x_step: 1,
x_size: 7,
x_start: 12,
x_length: 7,
round_position: true,
second_scale:{
x_unit: “week”,
x_date: “%W”
},
y_unit: objects,
y_property: “object_id”
};
scheduler.createTimelineView(timelineConfig);
scheduler.init(‘yapm-scheduler’, new Date(2014,11,31), “timeline”);[/code]
Above code correctly renders the timeline for current week (week 3: 12th - 18th of January), but the Previous and Next buttons are not working properly.
From the start pressing Next jumps the timeline to the 31st of January (19th expected)
From the start pressing Previous jumps the timeline to the 17th of January (5th expected)