gpt4 book ai didi

jquery - dayClick 无法正常工作全日历

转载 作者:行者123 更新时间:2023-12-01 07:40:45 25 4
gpt4 key购买 nike

我试图从 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 中。 ??

最佳答案

link 的帮助下我找到了问题的解决方案。并且还写在下面。

在我包含完整的日历 CSS 之前,如下所示

<link href="/css/vendor/fullcalendar.min.css" rel="stylesheet" />
<link href="/css/vendor/fullcalendar.print.css" rel="stylesheet" />

我只是在

中添加 media="print"标签
 <link href="/css/vendor/fullcalendar.print.css" media="print" rel="stylesheet" />

我的问题已经解决了。

关于jquery - dayClick 无法正常工作全日历,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49442707/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com