2014-05-25 124 views
-1

我擁有包含兩個事件的json。fullcalendar在Internet Explorer 11上無法正常工作12

在11個,即事件呈現在同一天, 一個是在26/5/2014,另一種是在27/5/2007

var myevents =[{"id":99,"title":"","start":"2014-05-26T07:30:00Z","end":"2014-05-26T13:00:00Z","color":"#fff","textColor":"#000","borderColor":"#000","allDay":false},{"id":101,"title":"","start":"2014-05-27T13:00:00Z","end":"2014-05-27T17:00:00Z","color":"#fff","textColor":"#000","borderColor":"#000","allDay":false}] 

$('#calendar').fullCalendar({ 
header: { 
    left: 'prev,next today', 
    center: 'title', 
    right: 'month,agendaWeek,agendaDay' 
}, 
editable: true, 
year: 2014, 
month: 4, 
events: function (start, end, callback) { 
    //console.log(myevents); 
    var obj = myevents//jQuery.parseJSON(myevents); 
    var events = new Array(); 

    $.each(obj, function (index, value) { 
     console.log(value) 
     event = new Object(); 
     event.id = value['id'] 
     event.title = value['start'];//value['id']; 
     event.start = value['start']; 
     event.end = value['end']; 
     event.color = value['color']; 
     event.textColor = value['textColor']; 
     event.borderColor = value['borderColor']; 
     event.allDay = false; 
     console.log(event); 

     events.push(event); 
    }); 
    callback(events); 
} 
}); 

http://jsfiddle.net/hLw3W/2/ enter image description here

+0

您應該向開發者報告任何問題,請參閱http://arshaw.com/fullcalendar/wiki/Report-a-Bug/ – bernhof

回答

0

的問題瓦烏用的Array.push 我改變了每個迴路

$.each(obj, function (index, value) { 
          events.push({ 
           id: value['id'], 
           start: value['start'], 
           end: value['end'], 
           title: "", 
           color: value['color'], 
           textColor: value['textColor'], 
           borderColor: value['borderColor'], 
           allDay: false, 
           canSubscribe: value['canSubscribe'] 
          }); 
         }); 

,它的WO rk fine

相關問題