Fullcalendar hide events only in month view

强颜欢笑 提交于 2019-12-12 14:04:58

问题


My problem is hidding events in a specific view. I need to hide events only in month view. Because in month view i have set on day click to redirect to the specific day in day view. and have colored days which depends on the events.

So i need that for better looking month view, with colored days only. and when i click on a day go to that and then appear all events normally.

I tried with eventLimit but with 0 value show all events.

Any idea?

Thanks


回答1:


You can use css in order to hide events in month view only.

Code:

.fc-month-view .fc-event-container{
    display: none;
}

Demo: http://jsfiddle.net/IrvinDominin/ecjvb8b7/




回答2:


i'm using this method to hide events of specified view because sometimes its hard to update css

eventRender: function(event, element, view) {
  if(view.type == 'month') {
    $(element).css("display", "none");
  } else {
    // Do nothing
  }
}


来源:https://stackoverflow.com/questions/33100954/fullcalendar-hide-events-only-in-month-view

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