I am wondering if this is a bug or if I am using it wrong.
I am using the scheduler in a timeline view.
I want to show a this week, previous week and next week.
It looks like the configuration should be done like this:
scheduler.createTimelineView({
name: "timeline",
x_unit: "day",
x_date: "%D %j-%n",
x_step: 1,
x_size: 21, /* number of days */
x_start: -7, /* starting day */
x_length: 7, /* next button: go forward 1 week? */
y_unit: sections,
y_property: "section_id",
render:"bar"
});
However, when I press the “next” button it looks like I am going forward 7 days, then x_start kicks in and pushes me back 7 days. Net-effect: the next button does nothing.
When I press the “previous” button I go back 7 days, then the x_start kicks in again and brings me back a total of 14 days. Effect: prev-button goes back 14 days.
I tried a x_length of 14, the forward button then works but the back-button goes back 21 days, ofcourse.
Hello,
we’ve confirmed bug with timeline configuration, hope will be able to fix it keeping backward compatibility.
For now you can use following function as a quick fix
[code] scheduler.createTimelineView({
name: “timeline”,
x_unit: “day”,
x_date: “%D %j-%n”,
x_step: 1,
x_size: 21, /* number of days /
x_start: -7, / starting day /
x_length: 7, / next button: go forward 1 week? */
y_unit: sections,
y_property: “section_id”,
render:“bar”
});
Thank you for looking into the issue and for your quick fix.
I am using the scheduler in a a system in such a way that the timelines are configurable by users. The quick fix is a fix of a very specific instance, but our users have an unlimited number of possible configurations.
Do you have a more generic quick fix for me that works for all cases?
Hello,
sorry for a big delay, we’ve been investigating the problem.
Here is more general function which should fix scrolling with negative x_start in any config.
I’ve tested it with several settings, it seems working correctly. Please let us know if it works for you.
Meanwhile we’ll continue searching easier way to solve the problem
configuration: scheduler.createTimelineView({
name: "timeline",
x_unit: "day",
x_date: "%D %j-%n",
x_step: 1,
x_size: 28, /* number of days */
x_start: -7, /* starting day */
x_length: 7, /* next button: go forward 1 week */
y_unit: sections,
y_property: "section_id",
render:"bar"
});
define and apply fix:[code] scheduler.attachEvent(“onTemplatesReady”, function(){
fixNegativeXStart(“timeline”);
});