我正在使用全日历视图功能。我在用 ,
全日历.css
fullcalendar.min.js。
我的代码是,
$('#calendar').fullCalendar({
header: {
left: 'prev,next',
center: 'title',
right: 'month,basicWeek,basicDay'
},
editable: true,
events:curEvents
});
它工作正常。但是,如果我将更多数据传递到“curevents”中,月视图高度就会变得很长。所以我喜欢添加“限制事件”概念与'查看更多/更多'选项/链接通过弹出框显示数据(或者)当我单击“viewmore”选项时,它将重定向到日视图。
所以我尝试了一些代码,
$('#calendar').limitEvents(4);
来自以下链接的帮助=>
fullcalendar,如何限制月视图中每天的事件数量 https://stackoverflow.com/questions/2575538/fullcalendar-how-to-limit-the-number-of-events-per-day-in-the-month-view
但月视图的高度仅对齐。“查看更多”按钮尚未显示。所以我想要用于工作此视图更多按钮功能的文件名。
如果你给出深入的代码解释意味着对我更有帮助。
查看更多按钮尚未显示,下面的代码也不限制事件。
$('#calendar').limitEvents(4);
尝试以下操作。
随着新版本 v2.1.0-beta2 于 17 天前发布Arshaw做了以下事情
已解决的问题:
- 带有“更多...”链接的最大事件 (304)
- 拖动/调整大小时不要触发 eventMouseover/eventMouseout (1297)
新选项:
- 事件限制
- 事件限制点击
- 事件限制文本
- 日期弹出格式
Source https://github.com/arshaw/fullcalendar/releases/tag/v2.1.0-beta2
因此,您可以执行以下操作:
$('#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)
});
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)