sandeep sandeep - 1 year ago 70
PHP Question

How to add event to a date in fullcalender on clicking a date

I am using fullcalender. Presently adding event to a date by using drag option.Now I need to add event by clicking on particular date.

Is there any option?

Answer Source

I found this code in the documentation:

    dayClick: function(date, jsEvent, view) {
        alert('Clicked on: ' + date.format());
        alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);
        alert('Current view: ' +;

        // change the day's background color just for fun
        $(this).css('background-color', 'red');

Edit: The dayClick is what I believe you're looking for.