首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >dayClick不工作全日历

dayClick不工作全日历
EN

Stack Overflow用户
提问于 2018-03-23 05:06:28
回答 1查看 860关注 0票数 1

我正试图从dayClick那里得到一些响应,但是当我点击那里时,什么都没有发生。下面是我的代码。

代码语言:javascript
复制
    $('.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');
    },
  });

它在摇摆不定中工作,但在我的Html中不起作用。??

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-03-23 06:21:05

链接的帮助下,我找到了解决问题的方法。也写在下面。

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

代码语言:javascript
复制
<link href="/css/vendor/fullcalendar.min.css" rel="stylesheet" />
<link href="/css/vendor/fullcalendar.print.css" rel="stylesheet" />

我只是在其中添加了media=“打印”标签

代码语言:javascript
复制
 <link href="/css/vendor/fullcalendar.print.css" media="print" rel="stylesheet" />

我的问题就解决了。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49442707

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档