Fullcalendar limit the display of available months?

前端 未结 9 1651
伪装坚强ぢ
伪装坚强ぢ 2020-12-11 04:11

I would like to find out how can I limit the fullcalendar to show a three months period and deselectable for the rest of the months like within a datepicker?

E.g. T

9条回答
  •  旧时难觅i
    2020-12-11 04:32

    you can use the option

    $('#calendar').fullCalendar({
                header: {
                    left: 'prev,next today',
                    center: 'title',
                    right: 'month,agendaWeek,agendaDay'
                },
                validRange: {
                    start: '2017-05-01',//start date here
                    end: '2017-07-01' //end date here
                },
                defaultDate: '2017-05-12'
                });
    

提交回复
热议问题