0

何らかの理由で、fullcalendar は、basicDay ビューで午後 7 時以降に発生するイベントを表示しません。イベントは月ビューで表示されますが、basicDay ビューでは表示されません。

任意の考えをいただければ幸いです。

これが私のコードです。同じページに 2 つのカレンダーがあります。1 つ目は月ビュー、2 つ目は basicDay ビューです。

  $(document).ready(function() {

  // page is now ready, initialize the calendar...

  $('#calendar').fullCalendar({
   weekMode:'variable',
   events: $.fullCalendar.gcalFeed(
    "http://www.google.com/calendar/feeds/google_account/public/basic"
   ),
   eventClick: function(event) {
    if (event.url) {
     window.open(event.url,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=750, height=450");
     return false;
    }
   }
  });

  $('#calendar_min').fullCalendar({
   height:193,
   header:false,
      defaultView: 'basicDay',
   events: $.fullCalendar.gcalFeed(
    "http://www.google.com/calendar/feeds/google_account/public/basic"
   ),
   eventClick: function(event) {
    if (event.url) {
     window.open(event.url,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=750, height=450");
     return false;
    }
   }
  });
 });
4

3 に答える 3

1

これは、EST にいることが原因です。新しいイベントを作成するときの時間は午前 12:00 GMT であるため、-5 時間 = 午後 7 時です。http://arshaw.com/fullcalendar/docs/event_data/で ignoreTimezone を使用して確認することをお勧めします。

于 2010-11-21T04:18:34.657 に答える
0

どのようなエラーが発生していますか? Google フィードを午後 7 時以降のイベントに置き換えると、正常に表示されます。(あなたの例には余分なものがありますが)}; 削除する必要があります。

       $('#calendar_min').fullCalendar({
            height: 193,
            header: false,
            defaultView: 'basicDay',
            events: [
            {
                title: 'Day',
                start: new Date(y, m, d, 20),
                end: new Date(y, m, d, 21),
                description: 'long description3',
                id: 2
            }],
            eventClick: function(event) {
                if (event.url) {
                    window.open(event.url, "_blank", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=750, height=450");
                    return false;
                }
            }
        });
于 2010-08-24T11:04:21.313 に答える
0

同様の問題がありました。Google カレンダーのタイムゾーンは EDT で、過去 4 時間のイベントが表示されませんでした。

この問題を修正するために、fullcalendar.js の fetchAndRenderEvents() (849 行目) を変更しました。

そうだった:

function fetchAndRenderEvents() {
        fetchEvents(currentView.start, currentView.end);
            // ... will call reportEvents
            // ... which will call renderEvents
    }

currentView.end に 1 日追加しました

function fetchAndRenderEvents() {
    // Add 1 day to end to ensure all events are fetched  when the time zone is applied.
    fetchEvents(currentView.start, currentView.end.add(1, 'days'));
        // ... will call reportEvents
        // ... which will call renderEvents
}
于 2014-10-25T04:41:40.900 に答える