Show total hours in Week view in the header

Hi there … we have a paid licence… Is it possible to show a total of the hours added to each day into the headers… like this:

you can redefine a template for column headers and make sure that calendar layout is refreshed each time data changes (so totals will be recalculated).
The code (JS) can look like following:


function dayTotal(date){
var from = Date(date)),
to =, 1, “day”);

var evs = scheduler.getEvents(from, to);

var total = 0;

for(var i = 0; i < evs.length; i++){
	total += evs[i].end_date - evs[i].start_date;
return total;


var dateTemplate =;
scheduler.templates.week_scale_date = function(date){
var total = dayTotal(date);
return dateTemplate(date) + “, TOTAL:” + Math.floor(total/(10006060)) + “hrs”;

scheduler.attachEvent(“onXLE”, function(){
scheduler.attachEvent(“onDragEnd”, function(){
scheduler.attachEvent(“onAfterLightbox”, function(){



Aliaksandr - this looks great but is it possible to have the minutes total also?

For example: total 7:45hrs

function dayTotal(date) from my sample returns total duration in milliseconds. Then it is formatted in week_scale_date template: return dateTemplate(date) + ", TOTAL:" + Math.floor(total/(1000*60*60)) + "hrs"; You can modify the formatting as you like