Timeline cell mode - Full month view

Hello,

I have a problem with the timeline in cell mode.
I have days on x axis and rooms on y axis. I wish to have the full month, so I did:

	scheduler.createTimelineView({
			 name:	"salletimeline",
			 x_unit:	"day",
			 x_date:	"%d",
			 x_step:	1,
			 x_size:	31,
			 y_unit:	scheduler.serverList("salles"),
			 y_property:"fk_salle",
			 render:	"cell",
			 section_autoheight:false,
			 dx:75,
			 dy:100
	});

The problem here it’s x_size, the number of day for me.

First, i want to know what functions you have for the month gesture (number of day, last day, …).
Second i think i have to implement something like this :

dhtmlxEvent(document,“click”,function(e){
scheduler.matrix.timeline.x_size = getDaysOfMonth(e);
scheduler.callEvent(“onOptionsLoad”,[]);
}

but i don’t know how to.

Thx in advance !

i found what i want :

var btn_next = document.getElementById('next');
var btn_prev = document.getElementById('prev');

btn_next.onclick = function() {
	var myDate = new Date(scheduler.getState().date);
	myDate.setMonth( myDate.getMonth() + 1 );

	scheduler.matrix.salletimeline.x_size = getNbJours(myDate);
	scheduler.setCurrentView(myDate, scheduler.getState().mode);
}; 

btn_prev.onclick = function() {
	var myDate = new Date(scheduler.getState().date);
	myDate.setMonth( myDate.getMonth() - 1 );

	scheduler.matrix.salletimeline.x_size = getNbJours(myDate);
	scheduler.setCurrentView(myDate, scheduler.getState().mode);
};

ok now, i have a new problem :

i want, when i click on the next and the previous button, to activate my code but only if i’m on my timeline mode. Something like this :

if(scheduler.getState().mode === ‘salletimeline’ )
{
//my code
}

but if i do this when i change the tab and go to another timeline or something else nothing change.

i made this :

var btn_next = document.getElementById(‘next’);
var btn_prev = document.getElementById(‘prev’);

btn_next.onclick = function() {
var myDate = new Date(scheduler.getState().date);
myDate.setMonth( myDate.getMonth() + 1 );

if(scheduler.getState().mode === 'salletimeline' ){
	scheduler.matrix.salletimeline.x_size = getNbJours(myDate);
	scheduler.setCurrentView(myDate, scheduler.getState().mode);
}else{
	scheduler._click.dhx_cal_next_button(0,+1);
}

};

btn_prev.onclick = function() {
var myDate = new Date(scheduler.getState().date);
myDate.setMonth( myDate.getMonth() - 1 );

if(scheduler.getState().mode === 'salletimeline' ){
	scheduler.matrix.salletimeline.x_size = getNbJours(myDate);
	scheduler.setCurrentView(myDate, scheduler.getState().mode);
}else{
	scheduler._click.dhx_cal_next_button(0,-1);
}

};

I think it’s correct, could you confirm ?