0
我正在研究一個應用程序,該應用程序需要一次選擇多天,並獲取按鈕單擊並將其插入到數據庫中的值。在fullcalendar每月視圖中選擇並取消選擇多天
以下是我正在使用的代碼來實現此目的。但我能夠這樣做。 任何人都可以幫我解決這個問題嗎?
$("#calendar").fullCalendar({
header: {
left: '',
center: 'title',
right: 'month'
},
// defaultDate: CurrentDate[0] + "/01/" + CurrentDate[1],
navLinks: true,
editable: true,
draggable: false,
eventLimit: true, // allow "more" link when too many events
events: message.ResponseData,
selectable: true,
select: function (start, end, jsEvent, view) {
$("#calendar").fullCalendar('addEventSource', [{
start: start,
end: end,
rendering: 'background',
//block: true,
},]);
$("#calendar").fullCalendar("unselect");
},
dayClick: function (date, jsEvent, view) {
$(".fc-state-highlight").removeClass("fc-state-highlight");
$(jsEvent.target).addClass("fc-state-highlight");
},
selectOverlap: function (event) {
return !event.block;
}
});