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;
}
添加回答
舉報