fullcalendar
2012-03-12 4 views 0 likes 
0

이것은 매우 이상합니다. 나는 공유 된 Google 캘린더를 사용하여 fullcalendar의 기본 기능을 설정하려고합니다. 간단히 gcal 데모 "gcal.html"을 내 자신의 캘린더 URL로 바꾸려고했습니다. 캘린더는 자체적으로 열립니다. 나는 gcal 데모에이기 때문에,Google 캘린더에서 이벤트를 표시하기 위해 전체 달력을 가져올 수 없습니다.

<head> 
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' /> 
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.print.css' media='print' /> 
<script type='text/javascript' src='../jquery/jquery-1.7.1.min.js'></script> 
<script type='text/javascript' src='../jquery/jquery-ui-1.8.17.custom.min.js'></script> 
<script type='text/javascript' src='../fullcalendar/fullcalendar.min.js'></script> 
<script type='text/javascript' src='../fullcalendar/gcal.js'></script> 
<script type='text/javascript'> 

    $(document).ready(function() { 

     $('#calendar').fullCalendar({ 
     header: { 
       left: 'prev,next today', 
       center: 'title', 
       right: 'month,basicWeek,basicDay' 
      }, 
      // US Holidays 
      events: 'https://www.google.com/calendar/embed?src=r9k375tdhq8auc1oc4kgmhpri4%40group.calendar.google.com&ctz=America/Chicago', 
      eventClick: function(event) { 
       // opens events in a popup window 
       window.open(event.url, 'gcalevent', 'width=700,height=600'); 
       return false; 
      }, 

      loading: function(bool) { 
       if (bool) { 
        $('#loading').show(); 
       }else{ 
        $('#loading').hide(); 
       } 
      } 

     }); 

    }); 

</script> 

내가 꽤 많이 나는 등, 모든 의존성이 권리가 있음을 확신하고 있습니다 : 여기에 몇 가지 코드입니다. URL을 주소 표시 줄에 꽂으면 내 캘린더가 열립니다. 이 캘린더는 공개로 설정되어 있습니다. 어떤 도움을 주시면 감사하겠습니다. Google 캘린더를 사용하는 전체 캘린더는 제대로 작동하는 경우 좋은 페어링처럼 보입니다.

답변

1

올바른 URL을 사용하고 있지 않습니다. FullCalendar는 전체 달력이 아닌 XML 피드를 원합니다.

See the documentation. 다음이 단계

시도 :

In the Google Calendar interface, locate the "My Calendar" box on the left 
Click the arrow next to the calendar you need. 
A menu will appear. Click "Calendar settings." 
In the "Calendar Address" section of the screen, click the XML badge. 
Your feed's URL will appear. 
: 캘린더의 XML 피드의 URL을 받아야합니다, 그리고

In the Google Calendar interface, locate the "My Calendar" box on the left. 
Click the arrow next to the calendar you need. 
A menu will appear. Click "Share this calendar." 
Check "Make this calendar public." 
Make sure "Share only my free/busy information" is unchecked. 
Click "Save." 

:

먼저 Google 캘린더를 공개해야

내가 원하는 URL이라고 생각합니다.

https://www.google.com/calendar/feeds/r9k375tdhq8auc1oc4kgmhpri4%40group.calendar.google.com/public/basic

+0

감사합니다. Brandon! 그것이 어리석은 무엇인가 알고 있었다. 그러나 나의 눈은 그것을 보지 않을 것이다. 감사! – Will

+0

@Will, 문제 없습니다. 이 방법으로 문제가 해결되면 체크 표시를 선택하여 답을 수락 할 수 있음을 잊지 마십시오. – Brandon

관련 문제