fullcalendar custom button change view code example

Example: call a function from within custom button fullcalendar vue

data: function() {
    return {    
        calendarOptions: {
            headerToolbar: {
                right: "today prev,next",
                center: "title",
                left: "dayGridMonth,timeGridWeek,timeGridDay",
            },
            customButtons: {
                next: {
                    click: this.nextButton,
                },
                prev: {
                    click: this.prevButton,
                },
            },
        },
    };
},
methods: {
    nextButton: function(event) {
        console.log(event);
        // calendar.next();
    },

    prevButton: function(event) {
        console.log(event);
        // calendar.prev();
    },
}