完整的日历将FC标题和FC项包装到单个div中

时间:2019-03-29 12:40:09

标签: fullcalendar

完整日历如何将fc-list-heading和fc-list-item包装到单个div中?

需要这样的输出

<div>
  <tr>fc-list-heading</tr>
</div>
<div>
  <tr>fc-list-item</tr>
  <tr>fc-list-item</tr>
</div>

enter image description here

1 个答案:

答案 0 :(得分:1)

我通过以下方式完成此操作:

eventAfterAllRender: function (view) {
  if (view.name == 'listUpcoming' || view.name == 'listPast') {
    let tableSubHeaders = $(".fc-list-heading");
    tableSubHeaders.each(function () {
      jQuery(this).nextUntil(".fc-list-heading").wrapAll("<tr class='fc-list-item-parent'></tr>");
       });
     }
}
相关问题