我试图让 jQuery fullcalendar 在 IE9 中工作。到目前为止,它在 Firefox 和 Chrome 中运行良好。我 100% 确定我在任何对象的末尾都没有逗号。
IE 的开发者控制台没有显示任何错误,完成了请求并显示了与 FF/Chrome 完全相同的 JSON 响应(多行格式以提高可读性):
[
{
"beschreibung":"",
"end":"2012-07-05 19:00:00",
"username":"dm",
"ort":"hier",
"allDay":"",
"id":"763-1340202369",
"title":"termin für den nächsten monat",
"start":"2012-07-05 17:00:00"
},{
"beschreibung":"dfgsfdg",
"end":"2012-07-31 12:00:00",
"username":"dm",
"ort":"",
"allDay":"",
"id":"UBePvX8AAQEAACyIg",
"title":"termin für heute",
"start":"2012-07-31 10:00:00"
}
]
这是我的代码:
$o = {
calOptions: { unselectCancel:'.calEdit', theme: true, buttonText: { today:'Heute', month:'Monat', week:'Woche', day:'Tag' }, monthNames: ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'], dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'], timeFormat: 'H(:mm)', axisFormat: 'H(:mm):00', header: { left:'prev,next today', center:'title', right:'month,agendaWeek,agendaDay' }, editable: true, allDayText: 'Ganztägig', firstDay: 1, firstHour: 8, allDaySlot: false, allDayDefault:false }
}
$('#db .fullCalendar').fullCalendar(
$.extend(
$o.calOptions, {
events: {
url: 'c.pl',
type: 'POST',
data: {
j: 'json',
x: 'c'
},
error: function(){
}
}
}
)
);
现在这是我根本没有得到的东西。当我将事件对象设置为 JSON 响应时,IE9 可以显示它们:
$('#db .fullCalendar').fullCalendar(
$.extend(
$o.calOptions, {
events: [{"beschreibung":"","end":"2012-07-05 19:00:00","username":"dm","ort":"hier","allDay":"","id":"763-1340202369","title":"termin für den nächsten monat","start":"2012-07-05 17:00:00"},{"beschreibung":"dfgsfdg","end":"2012-07-31 12:00:00","username":"dm","ort":"","allDay":"","id":"UBePvX8AAQEAACyIg","title":"termin für heute","start":"2012-07-31 10:00:00"}]
}
)
);
有什么想法可能是错的吗?我不知道在哪里继续搜索......