2017-05-17 70 views
1

我試圖設置一個顯示來自公共Google日曆的事件的完整日曆。我已經設置了一個測試日曆,並顯示了事件。但是,導航並沒有顯示出來?完整日曆導航鏈接不顯示

這裏是我的代碼:

<html> 
<head> 
<link rel="stylesheet" type="text/css" href="https://fullcalendar.io/js/fullcalendar-3.4.0/fullcalendar.min.css"> 
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.print.css"> 
<script src="https://fullcalendar.io/js/fullcalendar-3.4.0/lib/moment.min.js"></script> 
<script src="https://fullcalendar.io/js/fullcalendar-3.4.0/lib/jquery.min.js"></script> 
<script src='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.min.js'></script> 
<script src='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/locale/fi.js'></script> 
<script src='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/gcal.js'></script> 
<script> 
    $(document).ready(function() {   
     $('#calendar').fullCalendar({ 
     header: { 
       left: 'prev,next,today', 
       center: 'title', 
       right: 'month,agendaWeek,agendaDay,listWeek' 
      }, 
     weekNumbers: true, 
     navLinks: true, 
     googleCalendarApiKey: 'working api key here', 
     events: { 
      googleCalendarId: '[email protected]' 
     } 
    }); 
}); 
</script> 
<title> 
test calendar</title> 
</head> 
<body> 
<center> 
<div id='calendar'></div> 
</center> 
</body> 
</html> 

回答

1
問題

如果你想使用fullcalendar.print.css那麼你必須添加media="print"在樣式表中,這樣

<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.print.css" media="print"> 

,另一個選擇是,你還可以刪除從頁面此fullcalendar.print.css樣式表(但如果你想看到打印屏幕上的日曆,以及那麼請不要刪除fullcalendar.print.css

1

,你有很簡單只是這媒體= '打印' TP打印樣式表

<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.print.css" > 

添加到

<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.print.css" media='print'>