These docs are for an old release.
Info on upgrading to v5
customButtons
Defines custom buttons that can be used in the header/footer.
Object
Specify a hash of custom buttons. Then reference them from the header
setting. Like this:
var calendar = new Calendar(calendarEl, {
customButtons: {
myCustomButton: {
text: 'custom!',
click: function() {
alert('clicked the custom button!');
}
}
},
header: {
left: 'prev,next today myCustomButton',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay'
}
});
Each customButton
entry accepts the following properties:
text
- the text to be display on the button itselfclick
- a callback function that is called when the button is clicked. Accepts a single argument, a JavaScript native event.icon
- see buttonIcons. optionalbootstrapFontAwesome
- see bootstrapFontAwesome. optional