我想禁用dayClick
事件。在select
事件之后,dayClick
事件总是开火。我想阻止它。我可以禁用dayClick
事件吗?
$(function() {
$('#calendar').fullCalendar
({
defaultView: 'agendaDay',
defaultDate: '2018-04-07',
editable: true,
selectable: true,
eventLimit: true, // allow "more" link when too many events
header: {
left: 'prev,next today',
center: 'title',
right: 'agendaDay,agendaTwoDay,agendaWeek,month'
},
views: {
agendaTwoDay: {
type: 'agenda',
duration: { days: 2 },
groupByResource: true
}
},
resources: [
{ id: 'a', title: 'Room A' },
{ id: 'b', title: 'Room B', eventColor: 'green' },
{ id: 'c', title: 'Room C', eventColor: 'orange' },
],
events: [
{ id: '1', resourceId: 'a', start: '2018-04-06', end: '2018-04-08', title: 'event 1' },
],
select: function(start, end, jsEvent, view, resource) {
alert("select");
},
dayClick: function(date, jsEvent, view, resource) {
alert("dayClick");
return false;//not work
//jsEvent.preventDefault();//not work
//$('#calendar').fullCalendar('unselect');//not work
}
});