I try to get some data from my controller on click on specific day in fullcalendar. So when i click e.g 28-02-2022(monday) ajax should run and pass to my controller this date. What is the best way to pass date to my controller? I tried use https://fullcalendar.io/docs/dateClick but it not working.
dateClick: function (date) {
$.ajax({
url: "http://localhost/getHours",
dataType: 'json',
data: {
date: (date from the pressed button)
},
success: function (data) {
console.log(data);
},
error: function () {
alert("Oops! Something didn't work");
}
});
},