Search code examples
javascriptjqueryfullcalendar

How to call events on clicking prev and next button?


In jQuery fullcalendar we have previous and next buttons. How can we call some events on click of these buttons?


Solution

  • You couldsimply attach an event to the button:

    $('.fc-button-prev span').click(function(){
       alert('prev is clicked, do something');
    });
    
    $('.fc-button-next span').click(function(){
       alert('nextis clicked, do something');
    });