Our pure JavaScript Scheduler component

Post by sanid »

Hi Guys,

I am trying to add some final touches to my implementation of Scheduler component with https://www.bryntum.com/examples/scheduler/resourcetimeranges/, but they are not shown.
Scheduler Version is 4.0.3

My usecase:

    @Input() resourceTimeRangesFeature = true;
        [events]="schedulerEvents$ | async" 

Approach 1: Setting resourceTimeRanges as Array with matching resourceId

this.resourceVacations = [{
          id: 1,
          resourceId: 666,
          startDate: '2020-01-14',
          duration: 2,
          durationUnit : 'd',
          timeRangeColor : 'red',
          name: 'Test'

Approach 2.

 @ViewChild(SchedulerComponent, { static: false }) scheduler: SchedulerComponent;

const scheduler = this.scheduler.schedulerInstance as any;

   name           : 'New time range',
   startDate      : new Date(2020, 0, 14),
   duration       : 20,
  durationUnit   : 'h',
   timeRangeColor : 'green',
   resourceId     : 666

Result is still the same, timerange is not displayed, am I missing something?

Post by mats »

Could you please zip up a runnable test case for us so we can debug it?

Tired of debugging javascript errors in web applications? Try our powerful error logging service RootCause

Post by sanid »

Hi Mats,

Sure, its in the attachment.

All of the action happens in app.component.ts ngOnInit() method.

Note: node: 14.2.0v, scheduler: 4.0.3


(Attachment removed because Bryntum sources were added to the archive)

Post by pmiklashevich »

The time range year value is wrong. The time line shows 2021 and the time range is for 2020. Please update your data:

    this.resourceVacations = [{
      id: 1,
      resourceId: 1070,
      startDate: '2021-01-14', // 2020 => 2021
      duration: 2,
      durationUnit: 'd',
      timeRangeColor: 'red',
      name: 'Test'
Снимок экрана 2021-01-15 в 19.20.13.png
Снимок экрана 2021-01-15 в 19.20.13.png (69 KiB) Viewed 60 times


Pavel Miklashevich - Core Developer

Post by sanid »

Thanks guys,
This is awkward :oops: :)

Post Reply