FullCalendar Events show in month and list, but not week and day

My events show on the month view and on the list view, but not on the week or day view.

I have tried doing 'allDayDefault: false' in the initialization of the fullCalendar, and 'allDay: false' in the attributes of each of my events (both shown below).

   //This takes all of my events from a google calendar and puts them in an array to be fed to the fullCalendar
   var eventArray = [];
   var request = window.gapi.client.calendar.events.list({
     'calendarId': 'primary',
     'timeMin': (new Date()).toISOString(),
     'showDeleted': false,
     'singleEvents': true,
     'orderBy': 'startTime'
   }).then(function(response) {
     var events = response.result.items;

     var j = 0;
     if (events.length > 0) {
       var eventsArr = [];
       for (var i = 0; i < events.length; i++) {
         var event = events[i];
         var startDate = event.start.dateTime;
         var endDate = event.end.dateTime;
         if (!startDate) {
           startDate = event.start.date;
         }
         if (!endDate) {
           endDate = event.end.date;
         }
         var rowArray = {title: event.summary, start: startDate, end: endDate, id: event.id, allDay: false};
         eventsArr.push(rowArray);
         this.setState({
           eventArray: eventsArr
         })
       }
     } else {
       console.log('No upcoming events found.');
     }

     //This creates my fullCalendar
     $('#calendar').fullCalendar({
       header: {
         left: 'prev,next today',
         center: 'title',
         right: 'month,agendaWeek,agendaDay,listYear'
       },
       views: {
           month: { // name of view
               titleFormat: 'MMMM'
           },
           agenda: {
               titleFormat: 'MMM, DD'
           },
           listYear: {
             titleFormat: ' '
           }
       },
       defaultDate: $('#calendar').fullCalendar('today'),
       allDayDefault: false,
       navLinks: true, 
       editable: true,
       nowIndicator: true,
       eventLimit: true, 
       events: this.state.eventArray
     });

Does anyone know how to make the events show in week and day view as well?

链接地址: http://www.djcxy.com/p/81190.html

上一篇: 问题连接到iTunes连接

下一篇: FullCalendar事件显示在月份和列表中,但不是周和日