Hi, we are using Mobiscroll in Lightning web component in Salesforce, using Javascript. We are having issues with the renderHeader function. We want to add buttons to switch views but the function seems to only display the 4 radio buttons, but does not display the prev, today, and next buttons. We are currently using the 5.21.2 version.
This is the code snippet of our config:
config = {
timezonePlugin: mobiscroll.momentTimezone,
dataTimezone: ‘utc’,
displayTimezone: ‘utc’,
theme: ‘ios’,
themeVariant: ‘light’,
clickToCreate: false,
dragToCreate: false,
dragToMove: false,
dragToResize: false,
eventDelete: false,
view: {
schedule: {
type: ‘week’,
startDay: 1,
endDay: 5,
startTime: ‘08:00’,
endTime: ‘19:00’,
timeCellStep: 30,
timeLabelStep: 30,
}
},
eventOrder: function (event) {
return event.accepted ? 1 : -1;
},
onEventClick: function (event, config) {
new ShowToastEvent({
message: event.event.title
});
},
height: ‘auto’,
renderHeader: function () { // More info about renderHeader: Responsive event calendar documentation for Javascript | Mobiscroll
return ‘
Hi @Zsombor, we have used that code since the start and it’s not working. Are there other reasons why the prev, today, and next buttons are not displaying? The HTML seems to be rendered but it’s just not displaying in the UI.
Thanks for the suggestion. I have followed the suggestion and I think the components are registered now but they don’t seem to be applied to the HTML automatically. My understanding is that it’s supposed to be automatically applied after we have registered the component. Is this not right? Do we need to add something else inside the renderHeader function for the components to be applied?
We already registered eventcalendar as shown in the screenshot and it worked fine. Not sure why these other components are not working?