Triggered when the user clicks on a day.

function( date, jsEvent, view, [ resourceObj ] ) { }

date holds a Moment for the clicked day. If an all-day area has been clicked, the moment will be ambiguously-timed. If a slot in the agendaWeek or agendaDay views has been clicked, date will have the slot's time.

jsEvent holds the native JavaScript event with low-level information such as click coordinates.

view is set to the current View Object.

Within the callback function, this is set to the <td> of the clicked day.

Here is an example that demonstrates all of these variables:

    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');


The resourceObj parameter

Since the introduction of the Scheduler plugin, this callback reports a Resource Object parameter if the click happened on a resource. More information.