Our pure JavaScript Scheduler component


Post by calendardeveloper »

This is my calendars array. Does it look OK?

  const calendars = [
    {
      id: 'weekends',
      name: 'Weekends',
      // Intervals to define all SA and SU as non-working days
      intervals: [
        {
          recurrentStartDate: 'on Sat at 0:00',
          recurrentEndDate: 'on Mon at 0:00',
          isWorking: false,
        },
      ],
    },
  ];

Post by calendardeveloper »

Sorry, one more question. How do I control the virtual scroller (see screenshot)...Is this just a CSS change to reduce the thickness of the scroller? Or to completely remove them?

Image


Post by alex.l »

Yes it looks ok.
Could you please try to set data like this

            <BryntumProjectModel
                ref={project}
                events={events}
                resources={resources}
                assignments={assignments}
                dependencies={dependencies}
                calendars={calendars}
                calendar={'weekends'}
            />
            <BryntumSchedulerPro
                ref={schedulerpro}
                project={project}
                {...schedulerProConfig}
            />

Same for second instance of the SchedulerPro

All the best,
Alex


Post by alex.l »

Sorry, one more question. How do I control the virtual scroller (see screenshot)...Is this just a CSS change to reduce the thickness of the scroller? Or to completely remove them?

Please open a new topic for that question.

All the best,
Alex


Post by calendardeveloper »

alex.l wrote: Wed May 31, 2023 11:50 am

Yes it looks ok.
Could you please try to set data like this

            <BryntumProjectModel
                ref={project}
                events={events}
                resources={resources}
                assignments={assignments}
                dependencies={dependencies}
                calendars={calendars}
                calendar={'weekends'}
            />
            <BryntumSchedulerPro
                ref={schedulerpro}
                project={project}
                {...schedulerProConfig}
            />

This works as this was my original approach. But I can't get the 2 schedulers to partner up with this approach. Please read my previous messages. I need the first scheduler to show only the first resource and the 2nd scheduler to show all other resources. And they should partner up so the scrolling is in sync. ANd I also need the weekend calendar to show up.

Same for second instance of the SchedulerPro


Post by alex.l »

Hi,

In your first message you shared ProjectModel. I suggested you to create 2 ProjectModels, one for each SchedulerPro instance. The only difference from your previous solution when you declared data into SchedulerPro directly is that now you will do it throw ProjectModel config.

Regarding to solution with direct applying data, I was need you test it if it works good throw projectModel declaration with your data to confirm the problem. I've opened a ticket to fix the problem with direct apply calendars data https://github.com/bryntum/support/issues/6898

Please let us know if you got now the way to go.

All the best,
Alex


Post by calendardeveloper »

Yes, using 2 ProjectModels and 2 Schedulers works fine. The calendars and the timeranges show up correctly. All good. Thanks. And thanks for raising the issue for the direct approach as well.


Post by alex.l »

Hi, the ticket was closed as invalid. After more deep check we found that calendar config was never available on SchedulerPro level, it needs to be set on ProjectModel level

project : {
            calendar : 'weekends'
        }

That was the problem.
Inline data such as calendars and others, can still be set on both - SchedulerPro or ProjectModel level.

All the best,
Alex


Post Reply