任何人都知道如何在渲染事件时获取单元格日期以进行descision渲染或不渲染事件? 在月份视图中。 我为#34周视图"但是一个月它变成了地狱的厨房。 我甚至试图修改fullcalendar脚本,但它似乎毫无意义。
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
minTime: '08:00',
//maxTime: '22:00',
lang: 'ru',
defaultView: 'agendaWeek',
editable: false,
weekNumbers: true,
allDayDefault: false,
events: events,
eventRender: function(element, event, view){
$(event).find('div.fc-title').html(element.title);
$(event).find('span.fc-title').html(element.title);
// Odd-Even
switch (element.range) {
case 'every week':
var period = 'every';
break;
case 'even week':
var period = 'even';
break;
case 'odd week':
var period = 'odd';
break;
default:
// statements_def
break;
}
if (view.type == 'agendaWeek'){
mydate = new Date(view.currentRange.start._d);
var result = getWeekNumber(mydate);
if (period == result) {
return true;
}else if (period == 'every'){
return true;
}else{
return false;
}
}else if(view.type == 'month'){
//don't know what to do, view start and end date - month start and end
}
// END Odd-Even
}
});
有人可以帮忙吗?