fullcalendar上的日期点击事件

时间:2010-08-16 18:01:53

标签: jquery click fullcalendar

如何在fullcalendar上实现点击活动?

我想要实现的是在点击事件上显示一天,如下所示:显示点击的具体日期:9 th 或10 th 基于适当的点击事件的给定月份。

1 个答案:

答案 0 :(得分:3)

查看文档:{​​{3}}

$('#calendar').fullCalendar({
    dayClick: function(date, allDay, jsEvent, view) {

        if (allDay) {
            alert('Clicked on the entire day: ' + date);
        }else{
            alert('Clicked on the slot: ' + date);
        }

        alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);

        alert('Current view: ' + view.name);

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

    }
});
相关问题