Hello
I am using the scheduler in a small booking system with users and admins. The users only can use the week view. I have to limit their movements between the weeks. They are only allowed to see the actual week and 2 weeks bevore and in the future.
I tried to use the limit feature like this example with fixed dates for this week.
scheduler.config.first_hour = 8;
scheduler.config.last_hour = 23;
scheduler.config.time_step = 30;
scheduler.config.server_utc = true;
scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.config.limit_start = new Date(2011,9,25, 0, 0);
scheduler.config.limit_end = new Date(2011,10,1, 0, 0);
scheduler.config.limit_view = true;
scheduler.init('scheduler_here',null,"week");
scheduler.setLoadMode("week");
scheduler.load('functions/tennis.helper.php?action=getEvents');
var dp = new dataProcessor('functions/tennis.helper.php?action=editEvent');
dp.enableDataNames(true);
dp.setTransactionMode("POST");
dp.attachEvent("onAfterUpdate", function(sid, action, tid, tag){
if(action == 'inserted')
scheduler.changeEventId(sid, tid);
});
dp.init(scheduler);
with the necassary dhtmlxscheduler_limit.js included but it doesn’t seem to work.
Maybe it is possible to cancel the click event of the buttons after used two times in one way, or something.
Thanks for the help