天单击未工作全日历



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

我在链接的帮助下找到了问题的解决方案。还写在下面。

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

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

我只是添加媒体="打印"标签

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

我的问题解决了。

相关内容

  • 没有找到相关文章

最新更新