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: https://docs.mobiscroll.com/5-21-2/javascript/eventcalendar#opt-renderHeader
return ‘
‘
‘Work Week’ +
‘Daily’ +
‘Monthy’ +
‘Yearly’ +
‘
‘’ +
‘’ +
‘’;
}
}
And this is how it looks like:
If we don’t use the renderHeader function, the usual header seems to appear like usual (with the year and prev, today, next buttons showing).