Is it possible to limit agenda view just for 1 day and still take advantage of next day/prev day buttons? I did limit time range by scheduler.config.agenda_start/scheduler.config.agenda_end but I have no idea how to force day buttons to work.
Hi,
yes it’s possible. By default the Agenda shows a period of one year, default date is current date. You can set up it in this way:
[code]scheduler.date.agenda_start=function(){
return scheduler.date.date_part(scheduler.getState().date);
};
scheduler.date.add_agenda = function(date){
return scheduler.date.add(date, 1, “day”);
};
scheduler.attachEvent(“onBeforeViewChange”, function(old_mode,old_date,mode,date){
scheduler.config.agenda_start = new Date(date);
scheduler.config.agenda_end = scheduler.date.add(date, 1, “day”);
return true;
});[/code]
It works but only when I’m adding date (next day), when I click on prev. day it still adds one day. Also agenda view makes current day preview (".dhx_cal_date") disappear and I want it.
Sorry:
scheduler.date.add_agenda = function(date, inc, mode){
return scheduler.date.add(date, inc, "day");
};
To set up the date in the header of the view pls use this template:
docs.dhtmlx.com/scheduler/api__s … plate.html