Our pure JavaScript Scheduler component


Post by Alan »

The Event Editor, with the recurringEvents flag on, has a Repeat combo with the options: None, Daily, Weekly, Monthly, Yearly, Custom. Is there a way to remove an option from the combo? In my case I don't want users to have the Yearly option. If not, then I would like to request this feature.

I tried to use the dev tools in Firefox and Chrome to inspect the option to hide or remove it but I am not able to as it is dynamically generated and the combo disappears when I click on the inspect tool.

Thank you
Last edited by Alan on Mon Feb 03, 2020 3:59 pm, edited 1 time in total.

Post by mats »

You can access this combo via this property:

https://bryntum.com/docs/scheduler/#Scheduler/feature/EventEdit#property-recurrenceCombo

Use it to manipulate and remove any items you want.

Post by Alan »

Thank you for the quick responses that you and your staff always provide! I really appreciate it.

I saw the recurrenceCombo in the documentation, but it says it is read only, and I'm not sure what the default values are to override. I tried this, but it did not work:
    features: {
        eventEdit : {
            recurrenceCombo : {
                items : {
                    none: 'None',
                    daily: 'Daily',
                    weekly: 'Weekly',
                    monthly: 'Monthly',
                    custom: 'Custom...'
                }
            }
        }
    }
Any suggestions? Thank you

Post by mats »

I've opened a ticket to allow easy configuration of that field. Try this meanwhile
eventEdit : {
            editorConfig : {
                listeners : {
                    show : function () {
                        this.eventEditFeature.recurrenceCombo.store.filter(o => o.value !== 'YEARLY');
                    }
                }
            }
        }

Post by Alan »

That works great, thank you! As long as there is a way to do this, I don't need an easier way with config, this is very straightforward. Including this in the API documentation may be useful. And thanks again for the quick response!

Post Reply