1

我有这段代码:

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);
    $(this).css('background-color', 'red');
}

如您所见,这会在单击时更改日期单元格的背景颜色...我要做的是在满足条件时更改背景颜色,但是单击日期单元格时不会评估此条件...

任何人都知道如何实现这一目标?提前致谢!

4

1 回答 1

0

allDay will be set to true false if the user has clicked on a slot in the agendaWeek or agendaDay views. Otherwise, it will be true.

Refer this link http://arshaw.com/fullcalendar/docs/mouse/dayClick/

于 2013-06-14T13:34:10.243 回答