Are custom month and week agenda views possible?

I’ve successfully set up custom day and week views for my scheduler. However, I’m unable to do the same for month and week agenda views. Am I wrong in assuming that they are also customizable? If not, Please advise on what I may be doing wrong. Thanks!

Custom Month tab ‘A’:

[code]scheduler.date.A_start = scheduler.date.month_start;
scheduler.date.get_A_end = function(date) {
return scheduler.date.add(date,1,“month”);
}
scheduler.date.add_A = function(date,inc){
return scheduler.date.add(date,inc,“month”);
}

scheduler.templates.A_date = scheduler.templates.month_date;
scheduler.templates.A_scale_date = scheduler.templates.month_scale_date;

scheduler.filter_A = function(id, ev) {
if(ev.location != ‘A’) {
return false;
} else if(ev.is_vacation == ‘true’) {
return false;
}
return true;
}[/code]

Custom Week Agenda tab ‘B’:

[code]scheduler.date.B_start = scheduler.date.week_agenda_start;
scheduler.date.get_B_end = function(date) {
return scheduler.date.add(date,6,“day”);
}
scheduler.date.add_B = scheduler.date.add_week_agenda;

scheduler.xy.B_scale_height = scheduler.xy.week_agenda_scale_height;
scheduler.templates.B_event_text = function(start_date, end_date, event, date) {
return scheduler.templates.event_date(start_date) + " " + event.text;
};

scheduler.filter_B = function(id, ev) {
if(ev.location != ‘B’) {
return false;
} else if(ev.is_vacation == ‘true’) {
return false;
}
return true;
}[/code]

Hello,

Month and week agenda do not offer creating custom view functionality.
But what would you like them to do? Maybe it’s possible to do by some other ways.

Kind regards,
Ilya

I want to have three custom month tabs and three custom week agenda tabs for three different location. Each tab will filter for one of the three event locations.

Hello,

In that case you don’t really need custom views. You can use the same Month/Week agenda view but then changing view set up some flag which view you are selecting. And then in filter_month function check that flag and desired location.

Kind regards,
Ilya

Thanks Ilya, that was the kind of solution I was looking for.

I just have one minor problem right now. When I click on a tab and it renders the proper view, but all events are displayed by default… It doesn’t filter for the events I wanted to be displayed. However, when I click on the same tab again, only the filtered events are displayed.

I tried it many different ways, but with same results. Any idea what kind of fix I need for this issue?

Here’s a sample of my code:

scheduler.attachEvent("onViewChange", function(mode, date){ if(mode=="AM") { scheduler.setCurrentView(date,"month"); scheduler.filter_month = function(id, ev){ if(ev.location != 'A') { return false; } else if(ev.is_vacation == 'true') { return false; } return true; } } else if(mode=="AW") { scheduler.setCurrentView(date,"week_agenda"); scheduler.filter_week_agenda = function(id, ev) { if(ev.location != 'A') { return false; } else if(ev.is_vacation == 'true') { return false; } return true; } } else if(mode=="AD") { scheduler.setCurrentView(date,"agenda"); scheduler.config.agenda_start = new Date(date); scheduler.filter_day = function(id, ev) { if(ev.location != 'A') { return false; } else if(ev.is_vacation == 'true') { return false; } return true; } ... } }

Any assistance will be appreciated!