Our pure JavaScript Scheduler component


Post by jobshunt »

It possible to create very easily events from within the Scheduler. It is also possible to delete resources within scheduler while doing a right click on the resource.

But is it also possible to create a resource using right click or similar?

Post by mats »

Sure you can add a button or menu entry which does
scheduler.resourceStore.add({ name : 'my cool new resource' })
Simple as that! https://bryntum.com/docs/scheduler/#Core/data/mixin/StoreCRUD#event-add

Post by jobshunt »

Thank you mats. I know this possibility. I am rather looking for something similar like adding an event. So I just cannot do a double click on an empty resource row and simply fill in some information?!

I would suggest this as a feature request.

Post by mats »

So I just cannot do a double click on an empty resource row and simply fill in some information?!
You can implement exactly what you want in < 5 lines of code. We haven't received any other requests for this so unlikely that we'll add this to the core. But good suggestion, keep them coming! :)

Post by jobshunt »

It is just more convenient, if I can simply do a right-click -> add resource / double click and just fill in the columns in the added row instead of having an own button with an extra form having all the columns duplicated.

But sure, I will push up suggestions, if I find something useful missing. Speaking of this... Infinit Scrolling would be nice, if you could support this out of the box.

Post by mats »

Infinit Scrolling would be nice, if you could support this out of the box.
This is on our roadmap for Q3/Q4 :)

Post by pmiklashevich »

Please configure your context menu with new item.

If you want to add this item to timeline context menu please configure SchedulerContextMenu with items (object)
https://bryntum.com/docs/scheduler/#Scheduler/feature/ScheduleContextMenu
const scheduler = new Scheduler({
    features : {
        scheduleContextMenu : {
            items : {
                addResourceItem : {
                    text : 'Add resource',
                    icon : 'b-icon b-fa-plus',
                    onItem() {
                        scheduler.resourceStore.add({ name : 'New resource' });
                    }
                }
            }
        }
    },
If you want to add this item to cell context menu please configure ContextMenu with cellItems (array)
https://bryntum.com/docs/scheduler/#Grid/feature/ContextMenu
const scheduler = new Scheduler({
    features : {
        contextMenu : {
            cellItems : [
                {
                    text : 'Add resource',
                    icon : 'b-icon b-fa-plus',
                    onItem() {
                        scheduler.resourceStore.add({ name : 'New resource' });
                    }
                }
            ]
        }
    },
Note, context menu will be refactored in the next major release! Please check out update notes while upgrading.

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply