我需要在fullcalendar-4的dayGridMonth中添加每周摘要列。
我试图钩住dateRender事件。添加了新列,但其行为与常规daycolumn相同。
datesRender: function(info) {
var view = info.view;
if (view.type === 'dayGridMonth') {
$(view.header.el).find('tr').append('<th class="fc-day-header fc- widget-header fc-total">Total</th>');
var rows = $(view.dayGrid.el).find('.fc-row.fc-week.fc-widget-content');
for (var i = 0; i < rows.length; i++) {
$(rows[i]).find('div.fc-bg').find('tr').append('<td class="fc-day fc-widget-content fc-total">Total Row</td>');
}
}
}