I have 4 custom tabs for my scheduler.
tab A, tab B, & tab C are using the ‘Day’ mode template. However, I want to get tab D to show as a ‘Week’ mode. By default, the scheduler is set to Day mode. Tab D won’t show as a ‘Week’ mode, even if I set tab D’s templates to week.
I followed the example from here: docs.dhtmlx.com/doku.php?id=dhtm … stom_views
Here’s the code for A, B, and C:
[code]// A tab
scheduler.locale.labels.day_tab = “A”;
scheduler.filter_day = function(id, ev) {
if(ev.location != ‘A’) {
return false;
} else if(ev.is_D == ‘true’) {
return false;
}
return true;
}
// B tab
scheduler.locale.labels.B_tab = “B”;
scheduler.filter_B = function(id, ev) {
if(ev.location != ‘B’) {
return false;
} else if(ev.is_D == ‘true’) {
return false;
}
return true;
}
// C tab
scheduler.locale.labels.C_tab = “C”;
scheduler.filter_C = function(id, ev) {
if(ev.location != ‘C’) {
return false;
} else if(ev.is_D == ‘true’) {
return false;
}
return true;
}[/code]
And here’s the code for tab D:
[code]// D tab
scheduler.locale.labels.D_tab = “D”;
scheduler.date.D_start = scheduler.date.week_start;
scheduler.date.get_D_end = function(date) {
return scheduler.date.add(date,1,“week”);
}
scheduler.date.add_D = function(date,inc){
return scheduler.date.add(date,inc*7,“day”);
}
scheduler.templates.D_date = scheduler.templates.week_date;
scheduler.templates.D_scale_date = scheduler.templates.week_scale_date;
scheduler.filter_D = function(id, ev) {
if(ev.is_D == ‘false’) {
return false;
}
return true;
}[/code]
Let me know what I am missing in my code. I only want to render tab D as ‘Week’ mode.