在Fullcalendar jQuery插件中处理dblclick [英] Handle dblclick in Fullcalendar jQuery plugin
问题描述
我知道这个问题之前已经被问到过,但是自那以后就有了几个新版本。
I know that this question has been asked before, but several new versions have been released since then.
是否可以在日历中处理用于创建新约会的dblclick事件,而无需修改fullcalendar.js文件?这是很好的处理这个扩展在一个单独的文件与我的其他调整。
Is it possible to handle a dblclick event for creating a new appointment in the calendar without having to modify the fullcalendar.js file? It would be great to handle this extension in a separate file together with my other tweaks.
感谢提前!
<
Thanks in advance!
/ Adam
推荐答案
Adam的帖子位于 https://code.google.com/p/fullcalendar/issues/detail?id=231 使用此解决方案。
Adam's post at https://code.google.com/p/fullcalendar/issues/detail?id=231 uses this solution.
只要有可能,我都想让事情远离
fullcalendar的核心,并让人们通过api完成它们。
的唯一原因是eventClick / eventMouseover / eventMouseout作为核心的一部分是
b / c它们涉及一些特殊情况,例如与jquery
ui拖动&调整大小,所以我需要做的事情,如检查这些
类。
whenever possible i like to keep things out of the core of fullcalendar, and have people do them through the api. the only reason i have eventClick/eventMouseover/eventMouseout as part of the core is b/c they involve some special cases, such as conflicting with jquery ui dragging & resizing, so i need to do things like check for those classes.
我认为附加事件处理程序,如dblclick的最佳方法是
通过eventRender像这样:
i think the best way to attach event handlers like dblclick would be through eventRender like so:
$('#calendar').fullCalendar({
eventRender: function(event, element) {
element.bind('dblclick', function() {
alert('double click!');
});
}
})
请让我知道你是否感觉不同。谢谢
please let me know if you feel differently. thanks
我有最新的更新,这对我很好。
I have the newest update and this works great for me.
这篇关于在Fullcalendar jQuery插件中处理dblclick的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!