How to call events on clicking prev and next button?

后端 未结 11 1682
天涯浪人
天涯浪人 2020-12-24 07:26

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

11条回答
  •  北荒
    北荒 (楼主)
    2020-12-24 08:24

    Another solution is to define your custom prev/next button:

    $('#m_calendar').fullCalendar({
     header: {
             left: 'customPrevButton,customNextButton today',
             center: 'title',
     },
     customButtons: {
                    customPrevButton: {
                        text: 'custom prev !',
                        click: function () {
                            alert('custom prev ! clicked !');
    
                        }
                    },
                    customNextButton: {
                        text: 'custom ext!',
                        click: function () {
                           alert('custom ext ! clicked !');
                        }
                    },
                }
    });
    

提交回复
热议问题