我试图从dayClick
得到一些回复,但当我点击那里时,没有任何反应。我在下面给出了我的代码。
$('.full_calendar').fullCalendar({
header: {
left: 'prev,next, today',
center: 'title',
right: 'month,agendaWeek,agendaDay,listWeek',
},
defaultDate: '2018-03-12',
navLinks: true, // can click day/week names to navigate views
editable: true,
eventLimit: true, // allow "more" link when too many events
events: [{"title":"Email","start":"2018-03-21","className":"background_f05050","calender_type":0,"lifecycle_todo_id":31},{"title":"Personal Call","start":"2018-03-23","className":"background_5c9bec","calender_type":0,"lifecycle_todo_id":11},{"title":"Personal Call","start":"2018-03-23","className":"background_5c9bec","calender_type":0,"lifecycle_todo_id":17},{"title":"Personal Call","start":"2018-03-29","className":"background_f05050","calender_type":0,"lifecycle_todo_id":33},{"title":"Personal Call","start":"2018-05-03","className":"background_5c9bec","calender_type":0,"lifecycle_todo_id":12},{"title":"Personal Call","start":"2018-05-03","className":"background_5c9bec","calender_type":0,"lifecycle_todo_id":18},{"title":"Personal Call","start":"2018-05-06","className":"background_5c9bec","calender_type":0,"lifecycle_todo_id":30},{"title":"Email","start":"2018-05-08","className":"background_f05050","calender_type":0,"lifecycle_todo_id":32},{"title":"Personal Call","start":"2018-05-09","className":"background_f05050","calender_type":0,"lifecycle_todo_id":34},{"title":"Follow Up","start":"2018-03-13","className":"background_f05050","prospect_no":"381299717","note_id":2,"calender_type":1},{"title":"Follow Up","start":"2018-03-19","className":"background_f05050","prospect_no":"873529032","note_id":7,"calender_type":1},{"title":"Follow Up","start":"2018-03-24","className":"background_f05050","prospect_no":"873529032","note_id":8,"calender_type":1},{"title":"Follow Up","start":"2018-03-22","className":"background_f05050","prospect_no":"873529032","note_id":14,"calender_type":1}],
selectable: true,
eventClick: function(calEvent, jsEvent, view) {
var result = '';
switch(calEvent.calender_type){
case 0: {
fetchlifecycletododata(calEvent.lifecycle_todo_id);
break;
};
case 1: {
fetchnotesdata(calEvent.note_id);
break;
};
}
},
dayClick: function(date, jsEvent, view) {
console.log('hi');
},
});
它在jsfidddle中工作,但不在我的Html中。 ??
答案 0 :(得分:2)
我在link的帮助下找到了问题的解决方案。并在下面写下。
之前我包括完整的日历css如下
<link href="/css/vendor/fullcalendar.min.css" rel="stylesheet" />
<link href="/css/vendor/fullcalendar.print.css" rel="stylesheet" />
我只是添加媒体=&#34; print&#34;标签
<link href="/css/vendor/fullcalendar.print.css" media="print" rel="stylesheet" />
我的问题已经解决了。