I'm getting the following error, when I add events to a top frozen row. If the row is frozen to the bottom, the error doesn't occure.
TypeError: Cannot read properties of undefined (reading 'ignoreDisabledCells')
at DayPilot.Scheduler.Ts (daypilot-pro-angular.mjs:9663:28)
at HTMLDivElement.Gr [as __zone_symbol__ON_PROPERTYmouseup] (daypilot-pro-angular.mjs:9654:42)
at HTMLDivElement.wrapFn (zone.js:763:39)
at ZoneDelegate.invokeTask (zone.js:406:31)
at Object.onInvokeTask (core.mjs:26505:33)
at ZoneDelegate.invokeTask (zone.js:405:60)
at Zone.runTask (zone.js:178:47)
at ZoneTask.invokeTask [as invoke] (zone.js:487:34)
at invokeTask (zone.js:1600:14)
at HTMLDivElement.globalZoneAwareCallback (zone.js:1626:17)
This is the code that adds the events:
private createPlanningCommentEvent(item: PlanningComment) {
return <AttendancePlanningEvent>
{
id: DayPilot.guid(),
text: '',
resource: this.getPlanningCommentsResource().id,
start: new Date(item.date).date().addHours(12),
end: new Date(item.date).date().addDays(1),
backColor: 'transparent',
borderColor: 'transparent',
resizeDisabled: true,
moveDisabled: true,
toolTip: `<b>${this.dialogTextService.getTranslation('TitPlanComment')}</b><br>${item.comment}`,
areas: [
{
css: "scheduler_centered-time-header-icon",
image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfhDAgPAhOsXMMIAAAAGXRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjE51NayZAAAAKdJREFUOE+1k8ENwyAMRd3NOkKHgVulzFAJdQJfERy450I3YB9qt0YqkZWEtP3SUwjx+3AJ/CQxxosxBolpJ8iO6AC8QdRBUPRXAbdqQ2tMovcFW2lz7IjeF6SUqnNOhb+1OXZE//MN+L1RStku0LK4ekMv4FM+T805V0RcyoxesBdr7V308QKSq/f+KnpXcJOtsYQQZpIftDy9dwZDP8aZHsfk7wLwBLS2mmj33LmDAAAAAElFTkSuQmCC'
}
],
tags: {
type: 'PlanningComment',
data: item
}
};
}
getPlanningCommentsResource() {
let resource = this.personResources.find(r => r.frozen !== undefined);
if (!resource) {
resource = {
id: DayPilot.guid(),
name: '',
frozen: 'top'
};
this.personResources.push(resource);
}
return resource;
}