Our pure JavaScript Scheduler component

Post by jbrazier »


I was wondering if there's a better way to get all the intervals that are added to a project calendar?

I currently have this code but the last line feels wrong, I just haven't found the right property/getter yet instead of $currentValue to populate allIntervals.

It would also be good to replace the any with an actual class but again I can't find the right one to use as intervalStore isn't a property of CalendarModel.

const workingCalendar = (): CalendarModel =>
    ] as CalendarModel;

const calendar = workingCalendar() as any;

const allIntervals = calendar.intervalStore.$currentValue;

Post by marcio »

Hey jbrazier,

The CalendarModel has a intervals field that looks like what you're looking for https://bryntum.com/products/schedulerpro/docs/api/SchedulerPro/model/CalendarModel#field-intervals

Best regards,

Post Reply