I'm developing a js calendar for a website at our comapny(I'm using trial pro version)
One of the requirements is that the scale can be changed with one click, this is done.
dp.onBeforeTimeHeaderRender = function(args) {
var startDate = args.header.start.getDatePart().value;
var endDate = args.header.end.getDatePart().value;
var overlapDate = false;
overlapDate = DayPilot.Util.overlaps(new DayPilot.Date("2017-01-01"), new DayPilot.Date("2017-01-07"), startDate, endDate);
if(overlapDate){
args.header.backColor = "#ff0000";
}
};
dp.update();
dp.show();
On certain dates I want to color the header, I can do this without much of a problem using the code above.
When I switch the scale from week(default) to day the following error shows up:
Cannot read property 'height' of undefined
What does this means? How can I fix this Issue?
Also, I'm integrating DayPilot api on an OutSystems website, when the scale change is done a ajax refresh is performed.
Best Regards,
João Louro