fullcalendar,如何在月视图中限制每天的事件数量 [英] fullcalendar, how to limit the number of events per day in the month view

查看:1744
本文介绍了fullcalendar,如何在月视图中限制每天的事件数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我每天都有很多活动,并且按预期工作,但现在正在查看月视图,我的日历网格预计会更高。我想在月视图中隐藏一些这些事件,就像有一个视觉小节的摘要,在这一天有更多的事情可以显示。



我可以使用eventRender并返回false,但是我想知道给定日期有多少事件,所以我可以将渲染限制为大约4,那么也许我会添加一个事件,说更多...



所以问题可能是:如何计算给定日期的事件?



或者这更像是一个特征请求公开月视图的最大计数器?



谢谢

解决方案

从FullCalendar 2.1.0开始,包含此功能,只需使用:

  $('#calendarBlock')。fullCalendar {
eventLimit:true
[...]
});

演示: http://arshaw.com/js/fullcalendar-2.1.0-beta2/demos/agenda-views.html



文档: http://fullcalendar.io/docs/ display / eventLimit /

I have many events on a day, and it works as expected but now looking at the month view, my calendar grid is much taller that expected. I'd like to hide some of these events from the month view, like a summary with a visual que that there are more on this day than can be shown.

I can use eventRender and return false, but i would like to know how many events are on a given day, so i can limit the rendering to about 4, then perhaps i would add an event that says " more ... "

So the question may be : how to count the events on a given date ?

or is this more like a feature request to expose a max counter for month view ?

thanks

解决方案

As of FullCalendar 2.1.0, this feature is included, just use:

$('#calendarBlock').fullCalendar({
    eventLimit: true
    [...]
});

Demo: http://arshaw.com/js/fullcalendar-2.1.0-beta2/demos/agenda-views.html

Documentation: http://fullcalendar.io/docs/display/eventLimit/

这篇关于fullcalendar,如何在月视图中限制每天的事件数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆