我正在尝试将 Fullcalendar 用于我的休假申请之一。我启用了选择选项,以便用户可以选择日期并申请休假。但我想禁止周末被选中,即当用户点击周末时它应该发出警报。它可以实现吗?
我的代码
this.calendarOptions = {
height:450,
defaultDate: moment(new Date(),'YYYY-MM-DD'),
editable: false,
stick:true,
selectable:true,
eventLimit: false, // allow "more" link when too many events
events: this.eventList,
header: {
left: 'month basicWeek basicDay',
center: 'title',
right: 'today prev,next'
},
displayEventTime: false,
select: (start, end, allDay) => {
this.startDate=moment(start).format("YYYY-MM-DD");
this.endDate=moment(end).format("YYYY-MM-DD");
$('.first.modal').modal('show');
},
dayRender: (date, cell)=> {
//logic
},
selectOverlap:false,
};