[Fixed] Full calendar event bind to custom button for next prev, month week and day view in Angular


I have used fullcalendar in my angular project.
I want to bind default methods like pre, next, month views, week view and day view to custom button.

Please help me with this.
enter image description here


I got the solution we need to do something like this.

someMethod() {
    let calendarApi = this.calendarComponent.getApi();
    calendarApi.next(); // For next
    calendarApi.prev(); // For prev
    calendarApi.changeView('timeGridDay'); // changing view
    calendarApi.changeView('timeGridDay', '2017-06-01'); // change view for specific date
    calendarApi.changeView('timeGrid', {
                         start: '2017-06-01',
                         end: '2017-06-05'
                    }); // For changing week view or month view accodring to date.

Thank you @ADyson for your time and support

Leave a Reply

(*) Required, Your email will not be published