2 回答
TA贡献1851条经验 获得超3个赞
然后使用 fullcalendar.io/docs/eventLimitClick 更改单击该链接时发生的情况。如果您注意到,其中一个选项是“天”。– ADyson 非常感谢 Adyson
TA贡献1752条经验 获得超4个赞
在日历初始化中使用下面的函数,我们可以删除默认的更多链接文本“+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;
}

添加回答
举报
