admin管理员组文章数量:1356758
The jQuery fullCalendar plugin seems to have a problem in the editable mode in certain cases. If the eventClick handler is set and editable is true, than the eventClick function will not work, only the eventDrop function. If editable is set to false, the eventDrop function does not work (as expected), but the eventClick function does. I am not sure where the problem is, is it possible to use the eventClick and eventDrop handler while editable is true? Has someone encountered a similar problem while using the plugin?
$('#calendar').fullCalendar({ .. editable:true, eventClick: function(calEvent, jsEvent, view) { .. // only called if editable is false (?) }, eventDrop: function(event,dayDelta,minuteDelta,allDay,revertFunc) { .. // only called if editable is true (correct) }
The jQuery fullCalendar plugin seems to have a problem in the editable mode in certain cases. If the eventClick handler is set and editable is true, than the eventClick function will not work, only the eventDrop function. If editable is set to false, the eventDrop function does not work (as expected), but the eventClick function does. I am not sure where the problem is, is it possible to use the eventClick and eventDrop handler while editable is true? Has someone encountered a similar problem while using the plugin?
Share Improve this question edited Jan 27, 2012 at 18:22 0x4a6f4672 asked Jan 27, 2012 at 18:15 0x4a6f46720x4a6f4672 28.2k19 gold badges109 silver badges143 bronze badges 2$('#calendar').fullCalendar({ .. editable:true, eventClick: function(calEvent, jsEvent, view) { .. // only called if editable is false (?) }, eventDrop: function(event,dayDelta,minuteDelta,allDay,revertFunc) { .. // only called if editable is true (correct) }
- Hi I'm not getting this behaviour, I have editable: true and an eventClick handler which is firing no problem. What version of jQuery are you using? – James Ellis-Jones Commented Jan 29, 2012 at 21:44
- The site which produces the error uses jQuery 1.3.2. A simple demo site with jQuery 1.5.2 seems to be ok. Maybe the jQuery version is the problem. Won't you post your ment as an answer? It may be the solution. – 0x4a6f4672 Commented Jan 30, 2012 at 11:00
3 Answers
Reset to default 4First I thought the jQuery version has something to do with it. Further testing did not confirm this hypothesis. It turns out that the click handler works only if you disable resizing with disableResizing:true
, i.e. if editable is true (editable:true
) then the click event is only triggered if resizing is disabled (disableResizing:true
). Maybe the Resize and Click events influence each other somehow..
It seems from the above that using jQuery 1.3.2 was causing this problem and a more recent version of jQuery will fix this issue.
I also had the editable: true option and instead I fixed it by installing the jQuery UI modules:
- Draggable (the Droppable module is not required)
- Resizable
本文标签: javascriptfullCalendar eventClick handler does not work if editable falseStack Overflow
版权声明:本文标题:javascript - fullCalendar eventClick handler does not work if editable false - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744010748a2575518.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论