FullCalendar dayClick函数与select函数冲突

Jus*_*tin 3 jquery jquery-plugins fullcalendar

我注意到当我试图实现dayClick时:和select函数似乎在某处发生了碰撞.

这是一些缩小的代码.

// WHEN YOU SELECT MULTIPLE DAYS
            select: function(start, end, allDay) {
                var title = prompt('New Select Date:');
                if(title) {
                    calendar.fullCalendar('renderEvent',
                        {
                            title: title,
                            start: start,
                            end: end,
                            allDay: allDay
                        }, true);
                calendar.fullCalendar('unselect');
                alert("end of select");
                }
            },

            // ADDING A NEW EVENT
            dayClick: function (date) {
                alert("Day ("+ date +") was clicked");
            },
Run Code Online (Sandbox Code Playgroud)

所以当我在某一天"点击"时出现问题,它会提醒我哪个很好,但随后它会显示SELECT功能的提示.

所以它运行ALERT然后运行PROMPT窗口.我不确定为什么会这样做,我无法缩小推理范围,也许其他人有类似的问题?

如果您遇到修复或同样的问题,请告诉我.干杯.

Jus*_*tin 5

我发现您不需要SELECT + DAYCLICK来创建新事件.即使是1天或更长时间,选择也可以.因此,当我点击一天时,它会同时提示.呸,小问题,但至少我明白了.

我没有在文档中看到它,如果它在那里.希望它可以帮助别人.

干杯.