How to run ajax on click on specific day in fullcalendar

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 data. My controller return some data.
I try to do it by dayClick or dateClick but it not running ajax

    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");
            }
        });
    },