Fullcalendar,每天限制数量事件所需的文件,查看更多/更多按钮?

我在fullcalendar视图functionlity工作。 我在用 ,

fullcalendar.css

fullcalendar.min.js。

我的代码是,

$('#calendar').fullCalendar({ header: { left: 'prev,next', center: 'title', right: 'month,basicWeek,basicDay' }, editable: true, events:curEvents }); 

它的工作正常。 但是,如果我将更多数据传递到’curevents’中,则月视图高度会变长。 所以我喜欢用‘viewmore / more’选项/链接添加‘限制事件’概念来通过弹出框(或)显示数据当我点击’viewmore’选项时它会重定向到日视图。 所以我尝试了一些代码,

 $('#calendar').limitEvents(4); 

从以下链接的帮助=>

fullcalendar,如何限制月视图中每天的事件数

但是月份视图的高度只对齐。查看更多按钮尚未显示。所以我想要,用于处理此视图的文件名称更多按钮function。 如果你给出深层代码解释方法,它对我更有帮助。 查看更多按钮尚未显示,以下代码也不限制事件。

 $('#calendar').limitEvents(4); 

请尝试以下方法。

随着新版本v2.1.0-beta2发布17天前Arshaw做了以下事情

已解决的问题:

  • 带有“更多…”链接的最大事件(304)
  • 拖动/resize时不要触发eventMouseover / eventMouseout(1297)

新选择:

  • eventLimit
  • eventLimitClick
  • eventLimitText
  • dayPopoverFormat

资源

所以,你可以做到以下几点:

 $('#calendar').fullCalendar({ lang: 'en', eventLimit: true, // If you set a number it will hide the itens eventLimitText: "Something" // Default is `more` (or "more" in the lang you pick in the option) });