2017-08-16 242 views
0

我一直在使用Fullcalendar庫。當我們在單個單元格中有更多事件時,Fullcalendar彈出窗口不完全可見

當我在單個單元格中有更多事件發生在頁腳內時,可以解決日曆彈出的問題。 ,如下圖所示。 enter image description here

我試圖與z-index修復,但沒有奏效。

當我搜索修復發現這個pull request它不合併到主。

我無法找到一種方式,當我們可以移動彈出窗口。

你能幫我解決這個問題嗎?

+1

怎樣的z-index這裏解決任何事情,你沒有在Z軸的問題......如果 – CBroe

+0

你有太多的事件顯示出來在一個單元格中,您可以使用eventLimit選項來減少它們https://fullcalendar.io/docs/display/eventLimit/。當點擊「更多」按鈕時,其餘部分將顯示在彈出窗口中。 – ADyson

+0

我使用了事件限制,只有在點擊更多按鈕後才彈出上方彈出窗口。 –

回答

0

通過從日曆中選出最近的行並與最後一行進行比較,修復了此問題。 如果兩者相同,則只更改彈出位置。 請讓我知道如果任何人有任何其他好的解決方案

// If it is last row of in the calendar. 
     $elem.on('click', '.fc-more', function (evt) { 
      var closestRow = angular.element(this).parents().closest('.fc-row.fc-week')[0]; 
      var lastRow = angular.element(this).parents().find('.fc-row.fc-week:last')[0]; 
      if (closestRow === lastRow && screen.width <= 1700) { 
      var popElement = angular.element('.fc-popover.fc-more-popover'); 
      popElement.css({ 'top': popElement.position().top - 80 + 'px' }); 
      } 
     }); 
相關問題