I am using FullCalendar 2.2.3, and I want to update the database when users change any events. This is the calendar definition:
$('#calendar').fullCalendar({
firstDay: 1,
timezone: 'Europe/Madrid',
allDayDefault: false,
theme: false,
aspectRatio: 2.2,
timeFormat: 'H:mm',
header: {
left: '',
center: 'title',
right: 'today prev,next'
},
editable: false,
eventMouseover: function(event, jsEvent, view) {
if (view.name !== 'agendaDay') {
$(jsEvent.target).attr('title', event.title);
}
},
events: {
url: '/getEvents.php',
type: 'POST',
cache: false,
error: function() {
},
},
eventDrop: function(event, delta, revertFunc) {
if (!confirm("Are you sure about this change?")) {
revertFunc();
}
}
});
This works fine, but when I change eventDrop to update the database
eventDrop: function(event, delta, revertFunc) {
var parameters = {
"idevento" : event.id,
"fecha" : event.start
};
$.ajax({
type: "POST",
data: parameters,
url: '/cambiarFechaEventoUsuario.php',
success: function(data) {
var res = jQuery.parseJSON(data);
if (res.error == 0) {
alert('OK');
}
else {
alert('No OK');
}
},
error: function(e) {
alert('Server error');
}
});
}
I get the following error:
TypeError: this._ordinalParse is undefined
moment.min.js (línea 6, col 17468)
Also, if I use the file "es.js" (I'm Spanish), I get another error:
TypeError: e is undefined
es.js (línea 1, col 453)
I have not changed anything about each of these two js files.
Does anyone know how to fix this?
Thanks in advance and sorry for my English :(