FullCalendar Select没有'如果使用fullcalendar.js而不是fullcalendar
FullCalendar Select doesn't work if using fullcalendar.js instead of fullcalendar.min.js
全部,我使用的是fullcalendar下载中的示例,但我想使用fullcalendar.js而不是fullcalendar.min.js。当我进行此更改时,尽管选择选项不起作用(我无法选择任何时间范围,弹出窗口也不会出现)。
有什么想法需要在fullcalender.js文件中更改什么才能使其工作吗?
编辑我使用以下代码进行选择:
selectable: true,
selectHelper: true,
select: function(start, end, allDay) {
var title = prompt('Event Title:');
calendar.fullCalendar('unselect');
},
编辑#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);
}
}
我不知道为什么这不起作用,但事实并非如此。有什么改变的想法吗?
提前感谢!
这看起来是一个更大的问题,这个问题围绕着jQuery如何做事的一个新问题。此问题是由正则表达式的更改引起的,该正则表达式用于规范event对象中的"鼠标事件属性":https://github.com/jquery/jquery/blob/master/src/event.js#L7
这里有一个线程来监控这个解决方案:
http://code.google.com/p/fullcalendar/issues/detail?id=1168
但是,此修复程序在IE中不起作用。
相关文章:
- "TypeError:t.start未定义”;,在fullcalendar.min.js中,同时在我的网站上使
- FullCalendar backend PHP/JS to symfony 3
- Undefined不是Fullcalendar js上的函数
- FullCalendar.js在JS/Ajax/ColdFusion上没有持续触发
- FullCalendar JS(在没有事件时添加事件)
- 如何在fullcalendar.js上拖放两个事件
- FullCalendar.js为移动设备调整标题
- 对于basicDay视图和basicWeek视图,在fullcalendar.js中按班次(上午、白天、晚上、晚上)显示
- fullcalendar.js-点击按钮删除事件
- FullCalendar Select没有'如果使用fullcalendar.js而不是fullcalendar
- fullCalendar.js:按选定日期显示事件
- 我如何从数据库中获得fullcalendar.js中的事件id
- 在fullcalendar.js中使用PHP日期时,条目会提前一个月
- Fullcalendar js事件重叠
- Fullcalendar js如何从源代码构建
- fullcalendar.js: Uncaught TypeError: Cannot read property
- 无效日期在Fullcalendar js和Firefox,如何
- 如何使用Javascript扩展fullCalendar.js结束日期
- 来自经典asp页面的FullCalendar.js外部事件数据
- Fullcalendar.js插槽突出显示