Integrating jQuery fullcalendar into PHP website

前端 未结 11 867
夕颜
夕颜 2021-02-01 09:28

I would like to integrate the jQuery fullcalendar into my PHP website, but I don\'t know how to handle the event and how to use the JSON data from MySQL.

Any advice wou

11条回答
  •  -上瘾入骨i
    2021-02-01 10:05

    I'm not familiar with jquery. But I think the problem is that you are not taking into account the asynchronous nature of Ajax.

    Unless fullCalendar() does something very odd (fires off an Ajax request and waits for the response), then you will not be able to use an external source in the function in that way, because fullCalendar will have finished running by the time a response comes back from the server.

    There does not appear to be a clear example of what you are trying to do on the Week Calendar webpage, but I am sure that what you need is to create the calendar without the events, but with a callback defined for adding events; and then in some way fire off the external call.

提交回复
热议问题