search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Scheduler - Cannot read properties of undefined (reading 'ignoreDisabledCells')

Asked by Anonymous
1 year ago.

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;
  }
Comment posted by Dan Letecky [DayPilot]
1 year ago.

Do you add this event using right click?

Comment posted by Anonymous
1 year ago.

No, but I forget to tell, that the error happens on right clicking any cell. It doesn't matter to which row the cell belongs. I select it and right click, then the error shows.

Comment posted by Anonymous
1 year ago.

I discovered another wrong behaviour in this context. If I select one day and right click it, the selected range changes to half of the day. See please the attached video. Also, this error doesn't occur too, if I don't add events to the top frozen row.

Answer posted by Dan Letecky [DayPilot]
1 year ago.

> No, but I forget to tell, that the error happens on right clicking any cell. It doesn't matter to which row the cell belongs. I select it and right click, then the error shows.

Could you please check if this still happens with the latest build (2023.1.5487)? It should be fixed now.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.