1
我在我的MVC應用程序中使用FullCalendar。除了一件惱人的小東西外,它的工作很棒。全天插槽不會顯示在議程日程視圖中。它在議程週期中顯示正常,但不適用於議程日期。我在Firebug中進行了檢查,並且全天插槽的tr沒有被渲染。此應用使用了大量的.js文件(其中沒有我寫的),並操縱日曆已在.fullcalendar調用下面的代碼(除其他事項外)的文件:FullCalendar:全天插槽沒有出現在議程日程視圖
eventRender: function (event, element, view) {
if (!event.sphere) {
element.removeClass("fc-event");
element.addClass("fc-event-business");
}
if (typeof (currentItem) !== 'undefined' && currentItem != null && typeof (currentEvents) !== 'undefined' && currentEvents != null) {
if (typeof (eventsAmount) == 'undefined' || eventsAmount == null) {
eventsAmount = 0;
}
currentItem++;
if (currentItem == 1) {
for (keyevent in currentEvents) {
if (new Date(currentEvents[keyevent].start) >= view.visStart && new Date(currentEvents[keyevent].end) <= view.visEnd) {
eventsAmount++;
}
}
}
if (currentItem == 1 || currentItem == eventsAmount) {
MyJS.SetContentHeight(false);
if (currentItem == eventsAmount) {
currentItem = 0;
eventsAmount = 0;
}
}
} else {
MyJS.SetContentHeight(false);
}
},
莫非這成爲全天插槽未被渲染的原因?我應該如何改變這個以顯示插槽?我對JavaScript和jQuery的知識有限,因此非常感謝所有幫助。
謝謝。
實際上,這個功能沒有效果。嘗試刪除它,它仍然不會顯示。先來想想它也不起作用。我的日曆從午夜開始顯示,而不是從早上6點開始顯示。 – mijata