Only month view in fullcalendar (remove/Hide “Day” and “Weeks” view)

跟風遠走 提交于 2019-12-09 16:14:29

问题


My fullcalendar has - "Month|Week|Day" view , I want to remove or hide the "Week" and "Day" views as we have been using only "Month" View.

Can you please tell me how to do this?


回答1:


When you start fullcalendar, don't include agendayDay and agendaWeek. Something like

$('#calendar').fullCalendar({
    header: {
        left: 'prev,next',
        center: 'title',
        right: 'month'
    }
});

Update: To get rid of the month button:

$('#calendar').fullCalendar({
    header: {
        left: 'prev,next',
        center: 'title',
        right: ''
    }
});



回答2:


right : false is working.

 $('#calendar').fullCalendar({
            header: {
                left: 'prev,next ',
                center: 'title',
                right: false,
            },

    });


来源:https://stackoverflow.com/questions/16279544/only-month-view-in-fullcalendar-remove-hide-day-and-weeks-view

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!