2010-08-24 11 views
0

Pour une raison quelconque, fullcalendar n'affiche aucun événement survenant après 19 heures dans la vue basicDay. Les événements apparaissent dans la vue mensuelle, mais pas dans la vue basicDay.FullCalendar avec Gcal n'affiche pas les événements après 19 heures dans basicDay view

Toutes les pensées seraient appréciées.

Voici mon code. J'ai deux calendriers sur la même page. Le premier est la vue du mois, le second est basicDay view.

$(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; 
    } 
    } 
    }); 
}); 

Répondre

0

Quelle erreur obtenez-vous? Lorsque je remplace votre google feed avec un événement après 19 heures, il s'affiche très bien. (Bien que votre exemple ait un extra)}; cela doit être retiré.

 $('#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; 
       } 
      } 
     }); 
0

J'ai eu un problème similaire. Le fuseau horaire de Google Agenda était EDT et les 4 dernières heures de l'événement manquaient à l'affichage.

J'ai changé fetchAndRenderEvents() dans fullcalendar.js (ligne 849) pour corriger le problème.

Il était:

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

J'ai ajouté un jour à l'currentView.end

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 
}