FullCalendar events from asp.net ASHX page not displaying

前端 未结 7 1188
慢半拍i
慢半拍i 2021-01-14 15:36

I have been trying to add some events to the fullCalendar using a call to a ASHX page using the following code.

Page script:



        
7条回答
  •  萌比男神i
    2021-01-14 16:03

    Steve, I ran into something similar -- it would render the events if the JSON was directly in the fullCalendar call, but it would not render the identicla JSON coming from an outside URL. I finally got it to work by modifying the JSON so that "id", "title", "start", "end", and "allDay" had the quotes around them.

    So instead of this (to use your sample JSON): [{id: 0,title:'test 1',start: '2010-06-07',allDay: false},{id: 2,title:'test 2',start: '2010-06-07',allDay: false}]

    ...I had this: [{"id": 0,"title":"test 1","start": "2010-06-07","allDay": false},{"id": 2,"title":"test 2","start": "2010-06-07","allDay": false}]

    Now, why it worked locally but not remotely, I can't say.

提交回复
热议问题