Hi,
I created some custom TimelineViews and found a problem with the automatically created default_date in the header section.
The check whether a single date or a date range is displayed in ext_matrix.js is:
scheduler.templates[obj.name+"_date"] = function(datea, dateb){
if (datea.getDay()==dateb.getDay() && datea-dateb<(24*60*60*1000))
return scheduler.templates.day_date(datea);
return scheduler.templates.week_date(datea, dateb);
};
But datea is the first day and dateb the second one, i.e. it’s 9.1.2011 - 12.1.2011, which results in a negative number. Then this number is compared whether it’s smaller than a day in milliseconds or not.
scheduler.templates[obj.name+"_date"] = function(datea, dateb){
if (datea.getDay()==dateb.getDay() && dateb-datea<(24*60*60*1000))
return scheduler.templates.day_date(datea);
return scheduler.templates.week_date(datea, dateb);
};
dateb-datea results in correct display of date header.
Kind regards
schardt_c