Our pure JavaScript Scheduler component


Post by Andres »

When I second time open the page with scheduler component, i get the error Image https://clip2net.com/s/4cnx0iO

here is my code

 assistant: WorkOrderAssistant;
  woCode = this.route.parent.snapshot.params.id;

  features = {
    cellEdit: true,
    filter: true,
    quickFind: true,
    regionResize: true,
    stripe: true,
    eventEdit: false,
    eventMenu : {
      processItems({ eventRecord }) {
        return !eventRecord.data.readonly;
      }
    },
    scheduleMenu : {
      items : {
        addEvent : false
      }
    }
  };
  resourceStore = {
    remove: (e) => {
      if (e && e[0]) {
        this.removeUserFromSchedule(e[0].data.id);
      }
    }
  };

  viewPreset = {
    base: 'hourAndDay',
    columnLinesFor: 0,
    headers: [
      {
        unit: 'd',
        align: 'center',
        dateFormat: 'ddd DD MMM'
      },
      {
        unit: 'h',
        align: 'center',
        dateFormat: 'HH'
      }
    ]
  };

  columns = [
    { text: 'Name', field: 'name', width: 150, locked: true },
    { text: 'LOE', field: 'loe_human', width: 100, locked: true, align: 'center' }
  ];
<bryntum-scheduler *ngIf="assistant"
      #scheduler
      tooltip = "My cool Scheduler component"
      [resources]="assistant.resources"
      [events]="assistant.events"
      [features]="features"
      [startDate]="assistant.startDate"
      [endDate]="assistant.endDate"
      [viewPreset]="viewPreset"
      [useInitialAnimation]="false"
      [allowOverlap]="false"
      [resourceStore]="resourceStore"
      [rowHeight]="30"
      [resourceMargin]="5"
      [createEventOnDblClick]="false"
      (onBeforeEventAdd)="onBeforeEventAdd($event)"
      (onAfterDragCreate)="onAfterDragCreate($event)"
      (onBeforeDragCreate)="onBeforeDragCreate($event)"
      (onBeforeEventDrag)="onBeforeEventDrag($event)"
      (onBeforeEventEditShow)="onBeforeEventEditShow($event)"
      (onBeforeEventEdit)="onBeforeEventEdit($event)"
      (onDragCreateEnd)="onDragCreateEnd($event)"
      (onBeforeEventResizeFinalize)="onBeforeEventResizeFinalize($event)"
      (onBeforeDragCreateFinalize) = "onBeforeDragCreateFinalize($event)"
      (onBeforeEventDropFinalize) = "onBeforeEventDropFinalize($event)"
      (onBeforeEventDelete) = "onBeforeEventDelete($event)"
      (onBeforeDestroy) = "onBeforeDestroy($event)"
      (onBeforeAssignmentDelete) = "onBeforeAssignmentDelete($event)"
      [columns]="columns"
      (onCatchAll) = "onSchedulerEvents($event)">
    </bryntum-scheduler>

can you help?)


Post by pmiklashevich »

Make sure you're using the latest version. Produce a runnable testcase that we can check. Thanks.
P.S. Here is the guide how to ask for help: viewtopic.php?f=35&t=772

Pavlo Miklashevych
Sr. Frontend Developer


Post by Andres »

It's hard for me to reproduce this problem with some example, because I need to create a project with routing and connect it to the company BE, can you tell what 'eventsData' object is and how it can be initialized in angular?


Post by pmiklashevich »

can you tell what 'eventsData' object is and how it can be initialized in angular

Based on the name it's an array of events, most likely set to scheduler.eventStore.data. Please add more context, so it's clear what you're talking about.

Pavlo Miklashevych
Sr. Frontend Developer


Post by Andres »

When I second time open the page with scheduler component, i get the error Image https://clip2net.com/s/4cnx0iO

. I getting error with this array name, but i dosent use it anywhere


Post by saki »

I have see similar error before but it has already been fixed, as far as I know. Which version are you using?

If upgrading to the lates version (4.1.5 if applicable) does not resolve the issue, we really need a runnable showcase. The error originates from the minified code so we cannot even guess where the real root of it is.


Post by Andres »

I use "@bryntum/scheduler": "npm:@bryntum/scheduler-trial@4.1.0",
"@bryntum/scheduler-angular": "4.1.0",


Post by Andres »

Is 4.1.5 version for trial?


Post by saki »

Yes, just click "Free trial" at https://www.bryntum.com/


Post Reply