Is there a function for scheduler.render()?

First, thank you for the great support and activity shown in this forum!

I’d like to change some of the scheduler.config items dynamically via the scheduler.attacheEvent functions. For instance, when the view changes to the Month, I’d like the start_on_monday to be set to true (1). I’m successfully changing the configuration item, but the scheduler isn’t rendering it properly. Is there a way, other than init(); to accomplish this?

Here’s what I’m doing:

scheduler.attachEvent("onBeforeViewChange", function(old_mode, old_date, mode , date){
	if (mode=='month'){
		scheduler.config.start_on_monday ='0';
	}
	return true;
});

Thank you,
Rob

Found the solution on my own :smiley:.

I set

scheduler.config.update_render=true;

and changed the code to be

scheduler.attachEvent("onBeforeViewChange", function(old_mode, old_date, mode , date){
   if (mode=='month'){
      scheduler.config.start_on_monday =false;
   }
   return true;
});

And now it is working.

Thank you,
Rob

PS - I’m looking forward to the 3.0 version coming out!!

Hello, Rob.

And what exactly was not rendered correctly?
Following code worked just fine for me:

scheduler.config.start_on_monday = false; scheduler.attachEvent("onBeforeViewChange", function(old_mode, old_date, mode, date) { scheduler.config.start_on_monday = (mode == 'month'); return true; });
Best regards,
Ilya

Ilya,

Without setting scheduler.config.update_render=true, it wasn’t starting the week on Monday. Regardless, it’s working for me now :slight_smile:.

Thank you,
Rob