0
fullcalendar中的Dayclick在我的yii2站點中不起作用。我使用了下面的代碼。我無法獲得此代碼的工作。fullcalendar中的dayclick無法正常工作
$(document).ready(function() {
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
ignoreTimezone:true,
editable: true,
events: $list,
className: 'gcal-event',
eventClick:function(event){
var x = event.id;
document.cookie='id='+x+'';
$('#cal-modal').modal('show');
}
});
$('#calendar').fullCalendar({
dayClick: function(date, jsEvent, view) {
alert('Clicked on: ' + date.format());
$(this).css('background-color', 'red');
}
});
});
請看看我的代碼,並給出建議。
任何錯誤的表現? – momouu
沒有顯示錯誤。 –
是'alert('點擊:'+ date.format());'顯示? – momouu