Skip to content
Advertisement

AJAX data not posting using FullCalendar when trying to update

I have a calendar.php file which looks up “php/get-events” to display calendar events from the database (This currently works as expected). I am trying to use “php/calendarupdate” to then update the database with the new start/end times that have been dragged, but the data posting to this page always comes back as undefined, so it’s not finding it for some reason.

JavaScript

The following is where I get the data which successfully displays events on the calendar.

JavaScript

The following is the update file, which it is getting into ok, but the echo’s I try to display are all undefined.

JavaScript

It may be something simple, but from the documentation I’ve read, I can’t seem to figure out why my variables are not posting successfully. Thanks.

Advertisement

Answer

You have the wrong syntax for your eventDrop signature. See https://fullcalendar.io/docs/eventDrop

It should be

JavaScript

And then replace

JavaScript

and

JavaScript

with

JavaScript

and

JavaScript

This will get the information you need correctly from the data which fullCalendar supplies.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement