Fullcalendar not showing data

前端 未结 3 1614
萌比男神i
萌比男神i 2021-01-16 07:12

I\'m still a new programmer, and I have a problem getting this piece of code to work (that I got from here). It uses MySQL to store the data. I would like to understand all

相关标签:
3条回答
  • 2021-01-16 07:25

    Try replace:

     events: "http://localhost/tpsdb/fullcalendar/events.php",
    

    with:

     eventSources: [
    
                         {
                             url: 'http://localhost/tpsdb/fullcalendar/events.php',
                             type: 'GET',
                             data: {},
                             error: function () {
                                 alert('There was an error while fetching events!');
                             }
                         }
        ],
    
    0 讨论(0)
  • 2021-01-16 07:25

    Have you taken this fact into consideration that

    Month value is 0-based, meaning January=0, February=1, etc.

    http://arshaw.com/fullcalendar/docs/current_date/month/

    So '2014-02-05' will be 5th March.

    0 讨论(0)
  • 2021-01-16 07:29

    Also modify this:

    [
    {
        "id": "7",
        "title": "test",
        "start": "2014-02-05 00:00:00",
        "end": "2014-02-05 00:00:00",
        "url": "",
        "allDay": false  <-- change this to false without quotes
    },
    {
        "id": "8",
        "title": "Title 2",
        "start": "2014-02-06 00:00:00",
        "end": "2014-02-06 00:00:00",
        "url": "",
        "allDay": "false"
    },
    {
        "id": "9",
        "title": "Feb 1",
        "start": "2014-01-28 00:00:00",
        "end": "2014-01-28 00:00:00",
        "url": "",
        "allDay": "false"
    }
    ]
    
    0 讨论(0)
提交回复
热议问题