problems with custom view

Hi, all!
I created a custom view for weekend: = function(date){
		var next = date;
		next.setDate( date.getDate() - date.getDay() + 6 );
		return next;
} = function(date) {
} = function(date,inc){
scheduler.templates.weekend_date = scheduler.templates.week_date;
scheduler.templates.weekend_scale_date = scheduler.templates.week_scale_date;

Apparently, it is working normally, but when I click on the today button this view didn’t work anymore, until refresh the page. There is nothing in console.
Am I doing something wrong?

After click on today button at weekend view, the creation event doesn’t work correctly. Sometimes the lighbox doesn’t open and sometimes it opens with wrong time values. (1.62 KB)


Make the following change: = function(date){ var next = new Date(date); next.setDate( date.getDate() - date.getDay() + 6 ); return; }
Best regards,

It is working now… Thanks!