FullCalendar switch between weekends and no weekends

后端 未结 7 1396
天命终不由人
天命终不由人 2021-01-14 15:48

I was wondering if there was a way in Arshaw\'s FullCalendar to: 1- Change the calendar from showing weekends to not show weekends and vice versa. 2- To dynamically change t

7条回答
  •  悲&欢浪女
    2021-01-14 16:39

    Old topic but still is not solved with current implementation of fullCalendar (2 & 3). fullCalendar has feature 'changeView'. You have to customize view. You can do this by extending one of existing.

    $('#calendar').fullCalendar({
    views: {
        workWeek: {
            type: 'agendaWeek',
            hiddenDays: [0, 6]
        }
    }});
    

    Right now you can change view any time you need.

    $('#calendar').fullCalendar( 'changeView', 'workWeek' )
    

    or

    $('#calendar').fullCalendar( 'changeView', 'agendaWeek' )
    

提交回复
热议问题