Resizing the window of my browser calls week_scale_date

Hello,
I modified the appearance of the scheduler’s header with the function scheduler.templates.week_scale_date like this :

	function headerTotalWeek(date) {
		return  scheduler.date.date_to_str(scheduler.config.default_date)(date) +
"<div  class='totalBarWeek'>value1</div>";
	}

	scheduler.templates.week_scale_date = function(date){
		return headerTotalWeek(date);
	};

After that, i have to wait for the processing of my data to push the new value in my divs .totalBarWeek :

					var x = document.getElementsByClassName("totalGlobal");
					var i;
					for (i = 0; i < x.length; i++) {
						x[i].innerHTML=  "value2";  
					}

The problem arises after resizing the window of my browser.
the values of my divs are reset to “value1” :frowning:

How can disable the refresh of the scheduler, after resizing the window of my browser ?
Is there anyway we can prevent the function scheduler.templates.week_scale_date from being called after resizing the browser’s window ?

thank you for your help.

Hello,
the template functions are called on each update of scheduler layout (which happens on resizing), this us by the design and can’t be disabled.
So all dynamic content of header cells is expected to be done from the templates.
Can you clarify what exactly are you implementing?

Thanks for your feedback,

I have a property for each task in my calendar, and i want to put the total in the content of header per day .

Example :
ToDay 5.00
task1InToDay 4.00
task2InToDay 1.00

As I explained previously, after Resizing the window of my browser i loose the content that I added manually in the header , in my case i loose the value of the total “5.00” .