[英]Fullcalendar.js get events of the day on click
Fullcalendar.js 點擊獲取當天的事件
是否可以獲取我在月視圖中單擊的當天的所有事件,並使用Fullcalendar.js
在任何div
元素中打印它們?
這是我的 JSFiddle:
您始終可以遍歷所有事件並找出所選日期的哪個事件。 這是我的功能:
function getEvents(date){
all_events.forEach(function(entry) {
if (entry['start'] == date.format()){
alert(entry['title']);}
else if (entry['start'] <= date.format() && entry['end'] >= date.format()){
alert(entry['title']);}
});
}
你可以看看我的DEMO 。
如果您單擊日期 2014-10-06,將會有 2 個事件顯示在警報中。 單擊日期 2014-10-07 將僅提醒一個事件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.