Our pure JavaScript Scheduler component


Post by alexsbf »

I want to pass the scheduler instance to a class that creates a list of items for the ScheduleMenu:

< BryntumScheduler
ref = {
    scheduler
}
id = 'schedulerComponent'
    ....
scheduleMenuFeature = {
        {
            
items: { addEvent: false, // Add extra items shown for each event setDayType: { text: 'Set day type', icon: 'b-fa b-fa-fw b-fa-calendar-alt', cls: 'b-separator', menu: { plain: true, defaults: { anchor: '100%', margin: 0, padding: 0 }, items: DayTypeMenu.items( scheduler) // scheduler <-- undefined. } } } } } ... />

How do I access the scheduler to pass it to my DayTypeMenu class?


Post by saki »

Check please our online docs on how to access the scheduler instance: https://bryntum.com/docs/scheduler/#guides/integration/react.md#the-native-bryntum-scheduler-instance (Section 6. The native Bryntum Scheduler instance)

If that does not help then post please a runnable showcase so that we can sort it out. It is not obvious in which context (class or functional component, ...) the code runs from the posted snippet.


Post Reply