猿问

完整日历 4.0 fc-更多(2+ 更多) 弹出窗口在骑行

我需要与每天单元格块中弹出窗口消失

相关的帮助,当一天内事件太多时,将显示一个看起来像“+2更多”的链接。如何避免这个弹出窗口,我的要求是默认的事件Limit:2和接下来,对于剩余的它应该显示一个按钮,然后单击此按钮,它应该导航到类似于上面屏幕截图中的日间模式。


开心每一天1111
浏览 234回答 2
2回答

皈依舞

然后使用 fullcalendar.io/docs/eventLimitClick 更改单击该链接时发生的情况。如果您注意到,其中一个选项是“天”。– ADyson 非常感谢 Adyson

温温酱

在日历初始化中使用下面的函数,我们可以删除默认的更多链接文本“+n more”。eventLimitText: function() {return " ";}使用以下CSS(在HTML样式标签中),我们可以插入一个类似外观的按钮,而不是默认文本。a.fc-more {background-size: contain;cursor: pointer;width: 14px;height: 6px;letter-spacing: 1px;background-image: url(dots.png);background-color: #F0F0F0;border-top: 1px solid #CCCCCC;border-right: 1px solid #CCCCCC;border-bottom: 1px solid #CCCCCC;border-left: 1px solid #CCCCCC;border-radius: 4px;margin-top: 10px;float: right;background-position: center;}点.png是具有 3 个水平点的图像。在日历实例化中使用以下功能,我们可以单击“更多按钮”以更改为日视图。eventLimit: 3,eventLimitClick: function(cellInfo) {calendar.gotoDate(cellInfo.date);calendar.changeView('timeGridDay');}下图是我的本地日历点击更多按钮视图与悬停文本(点击更多单元格)和悬停css样式为:a.fc-more:hover:after { content: 'Click for more cells'; font-size: 9px; text-align: center; position: absolute; margin-top: -2px; margin-left: 15px; line-height: 2em; width: 12em; border-radius: 0.3em; background: #ffffcc; display: inline-block; }
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答