0

I am trying to use jQuery week calendar https://github.com/themouette/jquery-week-calendar/wiki to display the existing meeting on my webpage my problem is when the calendar is loading my events.php file is returning json data like

[{"id":"2","title":"Analytics","body":"Analytics","start":"2012-08-14 12:00:00","end":"60"},{"id":"8","title":"bvxc","body":"bvxc","start":"2012-08-17 12:00:00","end":"60"},{"id":"9","title":"anyp","body":"anyp","start":"2012-08-17 13:00:00","end":"60"},{"id":"16","title":"Analytbfn","body":"Analytbfn","start":"2012-08-17 10:45:00","end":"2012-08-17 12:30"},{"id":"17","title":"Analytbfn","body":"Analytbfn","start":"2012-08-16 08:00:00","end":"2012-08-16 10:15"},{"id":"18","title":"Analytbfn","body":"Analytbfn","start":"2012-08-18 07:30:00","end":"2012-08-18 11:00"}]

but these data are not loading in my calendar

Look at the http://dpaste.com/788236/ for my demo.js file Please tell me where i am doing wrong

4

2 回答 2

0

您应该以这种格式使用 START ,END 时间

yyyy-MM-ddTHH:mm:ss

  EX : "start" :"2012-08-14T12:00:00"
       "end":"2012-08-14T13:00:00"
于 2013-08-09T04:58:59.123 回答
0

您应该返回一个带有名为“events”的属性的 JSON 对象,其值设置为事件集合。前三个事件的“end”参数也不正确。它应该指示约会的结束日期+时间,而不是持续时间 (60)。

这将起作用:

{
 events: [{ "id": "2", "title": "Analytics", "body": "Analytics", "start": "2012-08-14 12:00:00", "end": "2012-08-14 13:00:00" }, { "id": "8", "title": "bvxc", "body": "bvxc", "start": "2012-08-17 12:00:00", "end": "2012-08-17 13:00:00" }, { "id": "9", "title": "anyp", "body": "anyp", "start": "2012-08-17 13:00:00", "end": "2012-08-17 14:00:00" }, { "id": "16", "title": "Analytbfn", "body": "Analytbfn", "start": "2012-08-17 10:45:00", "end": "2012-08-17 12:30" }, { "id": "17", "title": "Analytbfn", "body": "Analytbfn", "start": "2012-08-16 08:00:00", "end": "2012-08-16 10:15" }, { "id": "18", "title": "Analytbfn", "body": "Analytbfn", "start": "2012-08-18 07:30:00", "end": "2012-08-18 11:00"}]
    }
于 2012-08-18T21:14:01.677 回答