FullCalendar - Only display 'allDay' slot when in agenda view (weekly or daily)

泪湿孤枕 提交于 2019-12-07 13:54:49

问题


My application only deals in full day events, so I'd like to be able to only display the allDay section for agendaViews. See screen shot below. I want to hide the areas highlighted in red.

Calendar widget: http://arshaw.com/fullcalendar/

Screens:


回答1:


You overcomplicated it. Check the basicViews, http://arshaw.com/js/fullcalendar-1.6.4/demos/basic-views.html and have your events only with start date

{
    title: 'All Day Event',
    start: new Date(y, m, d)
}



回答2:


You can use "basicWeek" and "basicDay" view,

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


来源:https://stackoverflow.com/questions/23044618/fullcalendar-only-display-allday-slot-when-in-agenda-view-weekly-or-daily

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