すべて、 私はfullcalendarのダウンロードの例を使用していますが、代わりにfullcalendar.jsを使用したいと思いますfullcalendar.min.js。 selectオプションが機能しないのに(私は時間範囲を選択することができず、ポップアップが表示されませんが)この変更を行うと、fullcalendar.jsをfullcalendar.min.jsの代わりに使用すると、FullCalendar Selectが機能しない
この作業を行うためにfullcalender.jsファイルで何を変更する必要がありますか?
EDIT私は私の選択のために、次のコードを使用しています:
selectable: true,
selectHelper: true,
select: function(start, end, allDay) {
var title = prompt('Event Title:');
calendar.fullCalendar('unselect');
},
EDIT#2問題がselectHelperであると思われます。その部分をコメントアウトすると、私は使用したい時間を選択できますが、素敵なオーバーレイはありません。ここでは、これを行いfullcalendar.jsからのコードは次のとおりです。
function renderSlotSelection(startDate, endDate) {
var helperOption = opt('selectHelper');
coordinateGrid.build();
if (helperOption) {
var col = dayDiff(startDate, t.visStart) * dis + dit;
if (col >= 0 && col < colCnt) { // only works when times are on same day
var rect = coordinateGrid.rect(0, col, 0, col, slotContent); // only for horizontal coords
var top = timePosition(startDate, startDate);
var bottom = timePosition(startDate, endDate);
if (bottom > top) { // protect against selections that are entirely before or after visible range
rect.top = top;
rect.height = bottom - top;
rect.left += 2;
rect.width -= 5;
if ($.isFunction(helperOption)) {
var helperRes = helperOption(startDate, endDate);
if (helperRes) {
rect.position = 'absolute';
rect.zIndex = 8;
selectionHelper = $(helperRes)
.css(rect)
.appendTo(slotContent);
}
}else{
rect.isStart = true; // conside rect a "seg" now
rect.isEnd = true; //
selectionHelper = $(slotSegHtml(
{
title: '',
start: startDate,
end: endDate,
className: ['fc-select-helper'],
editable: false
},
rect
));
selectionHelper.css('opacity', opt('dragOpacity'));
}
if (selectionHelper) {
slotBind(selectionHelper);
slotContent.append(selectionHelper);
setOuterWidth(selectionHelper, rect.width, true); // needs to be after appended
setOuterHeight(selectionHelper, rect.height, true);
}
}
}
}else{
renderSlotOverlay(startDate, endDate);
}
}
私はこれが働かない理由はわからないが、それはありません。何を変えるべきなのか?
ありがとうございます!