2016-05-20 21 views
0

我正在使用JQuery Fullcalendar(v2.6.1)。Fullcalendar'agendaDay'視圖中未顯示最後一行EOD事件

我創建了一個事件,從今天23:50開始,最後在明天凌晨02:00結束。但是這個事件的標題並沒有顯示在今日的名單上。 內容高度未根據確切內容進行調整。

$(document).on('pageshow','#index',function(e,data){  
    var date = new Date(); 
    var d = date.getDate(); 
    var m = date.getMonth(); 
    var y = date.getFullYear(); 

    $('#calendar').fullCalendar({ 
     editable: true, 
     defaultView: 'agendaDay', 
     events: [ 
      { 
       title: 'Meeting', 
       start: new Date(y, m, d, 23, 50), 
       allDay: false 
      } 
     ] 
    }); 
}); 

FIDDLE

我想充分展現下圖中所標示的事件。 enter image description here

是否可以顯示事件詳細信息而不會打破今天的列表本身?

+0

你怎麼會看到呢?你想看第二天1AM?我認爲你應該使用一個顯示事件詳細信息的大工具提示 –

+0

Hello jeff,你有什麼解決方案嗎? – Komal

+0

@kim:我只是減少了EOD事件的'top'css屬性。所以它會顯示在視圖內。 –

回答

-1
$(document).on('pageshow','#index',function(e,data){  
    var date = new Date(); 
    var d = date.getDate(); 
    var m = date.getMonth(); 
    var y = date.getFullYear(); 

    $('#calendar').fullCalendar({ 
     editable: true, 
     defaultView: 'agendaDay', 
     events: [ 
      { 
       title: 'Meeting', 
       start: new Date(y, m, d, 23, 59), 
       end: new Date(y, m, d+1, 14, 00), 
       allDay: false 
      } 
     ] 
    }); 
}); 

你已經忘了添加結束日期

+0

我不需要顯示它到下午2點。 也需要在今天的名單中顯示活動詳情。意思是,最後一行必須需要事件詳細信息 –

+0

不,它不會顯示任何細節,因爲它不再顯示任何空間 –

+0

它有任何解決方案嗎? –

0

使用此格式開始和結束日期。

start: '2016-05-19T12:59:00', //start time 
    end: '2016-05-20T10:00:00', //End time 

它會在兩天內顯示該事件。

defaultView: 'agendaWeek', 

enter image description here

defaultView: 'agendaDay', 

enter image description here

enter image description here

+0

請再次檢查問題 –