How is your controller endpoint at /event-calendar handling the request?
The json data being sent in that POST request doesn't have keys, which may be responsible for the disconnect between the frontend and the backend.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello, I'm having some problems with creating places in fullcalendar, I'm using vue js for this but it's the first time I'm working with vue js and fullcalendar. And my problem is that I can create events in the calendar, but the event is not created on the date I click, but on today's date. And I have the impression that I didn't do something right, since the event creation method uses javascript and not vue. So can someone help me with the right way how to create events?
<div class="schedule-calendar bg-light card p-5">
<FullCalendar :options="calendarOptions" />
</div>
.....
select: this.selectEventFunction,
eventSources: [
{
events: function(fetchInfo, successCallback, failureCallback) {
axios.get('/getEvent').then(response => {
successCallback(response.data.data)
});
}
}
]
created method
methods: {
selectEventFunction: function(start,end,allDays) {
// console.log(start);
$('#addEventCalendar').modal('toggle');
$('#createEvent').click(function () {
var title = $('#title').val();
var start = moment(start).format('YYYY-MM-DD');
var end = moment(end).format('YYYY-MM-DD');
// console.log(start);
$.ajax({
url: "/event-calendar",
type: "POST",
dataType: 'json',
data: {
title,
start,
end
},
success: function(response)
{
console.log(response)
},
error:function(error)
{
console.log(error)
},
});
});
},
},
[Sloved]
The problem was here
selectEventFunction: function(selectionInfo) {
console.log(selectionInfo.startStr);
Datatable does not usestart,end,allDay as i tryed before
Please or to participate in this conversation.