I just have a minor problem right now. When I click on a tab and it renders the proper view, but all events (including the ones that are supposed to be filtered out) 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;
}
...
}
}