Top date wrong

Hello

I have an issue with the top date in week view.

For example if the week start day 7 dec 2015 the week date show:

7 dec 2015 - 15 dec 2015

but I have set this on setup:

scheduler.createUnitsView({
	name:"week_unit",
	property:"section_id",
	list:sections,
	days:3,
});

Then the correct day to display is:

7 dec 2015 - 9 dec 2015

The columns on the scheduler is correct the problem is only on top date in week mode.

Hello.

Is it correct that you are trying to show only three days and in header it show like 8 days?
Unfortunately, i can’t reproduce this issue.

If it’s not your problem or you want to show not default dates at top you could define “{gridName}_date” template.
See article:
docs.dhtmlx.com/scheduler/api__s … plate.html

Hello Sten

Thanks for anwser.

I can reproduce it in the demo scheduler too.

For example take the html “samples/02_customization/07_custom_view.html”

If I want show only 3 days on Decade view I modify this line:

Original
58.- scheduler.date.add_decade=function(date,inc){ return scheduler.date.add(date,inc*10,“day”); }

To
58.- scheduler.date.add_decade=function(date,inc){ return scheduler.date.add(date,inc*3,“day”); }

It show correctly 3 days on this view but the Next and Prev dont work correctly.

I tested again in the example code and work correctly
I modified this:

//decade
scheduler.date.decade_start = function(date){
var ndate = new Date(date.valueOf());
ndate.setDate(Math.floor(date.getDate()/3)3+1);
return this.date_part(ndate);
}
scheduler.templates.decade_date = scheduler.templates.week_date;
scheduler.templates.decade_scale_date = scheduler.templates.week_scale_date;
scheduler.date.add_decade=function(date,inc){ return scheduler.date.add(date,inc
3,“day”); }

And work correctly, what’s the correct way to make a week_unit to show from 7 days to 3 days?

I have this:

scheduler.createUnitsView({
name:“week_unit”,
property:“section_id”,
list:sections,
days:3,
});

but the Next and Prev dont work correctly.

I found the problem

In the config of scheduler I put this:

scheduler.date.week_unit_start = scheduler.date.week_start

I delete it and work correctly.