按照本博客(http://jake1164.blogspot.com/2010/06/jquery-fullcalendar-and-aspnet.html)中列出的基本guildelines,我创建了一个基于asp.net vb的Web服务,它返回以下json数据....但是日历不显示任何事件。有关可能导致问题的原因的任何想法?提前谢谢。
<?xml version="1.0" encoding="utf-8"?><string xmlns="http://tempuri.org/">[{"id":1,"title":"Doctor D1","start":1279854594},{"id":2,"title":"Doctor D1","start":1279692000},{"id":3,"title":"Doctor D1","start":1279778400},{"id":4,"title":"Doctor D1","start":1280498809},{"id":5,"title":"Doctor D1","start":1280469600},{"id":6,"title":"Doctor D1","start":1280469600},{"id":7,"title":"Doctor D1","start":1280469600},{"id":8,"title":"Doctor D1","start":1280469600},{"id":9,"title":"Doctor D1","start":1280469600},{"id":10,"title":"Doctor D1","start":1280815200},{"id":11,"title":"Doctor D1","start":1280815200},{"id":12,"title":"Doctor D1","start":1280901600},{"id":13,"title":"Doctor D1","start":1281074400}]</string>
答案 0 :(得分:1)
我的猜测是你没有修改fullcalendar脚本@ line~421。需要使用javascript eval函数将json转换为fullcalendar可以使用的内容。
reportEventsAndPop = function(a){
if(a.d){ var a = eval('('+ a.d.dreplace(/ StartDate / g,'start')。replace(/ EndDate / g,'end')+')'); }
reportEvents(a);
popLoading();
};