使用Twitter Bootstrap Popover的Fullcalendar

Mer*_*ion 16 popover fullcalendar twitter-bootstrap

我想让Fullcalendar使用twitter boostrap popovers.
如果我点击一个事件,我想在popover中显示一些细节.
所以首先将这个lil片段添加到Fullcalendar:

eventClick: function(event, jsEvent, view) {
        $this = $(this);
        $this.popover({html:true,title:event.title,placement:'top'}).popover('show');
        return false;            
    },
Run Code Online (Sandbox Code Playgroud)

但现在我遇到了两个问题:

  1. Fullcalendar位于具有overflow:hidden之类的div中,因为popover会在Fullcalendar的边框上被切断.我该如何解决这个问题?
  2. 与问题2类似,我想通过顶部,左侧,右侧或底部的函数放置弹出窗口,具体取决于事件在Fullcalendar网格中的位置.我该怎么做这样的功能?

谢谢!

小智 19

从版本2.3引导程序现在有一个弹出窗口的"容器"选项,它将弹出窗口附加到特定元素.

只需添加{container:'body'}将其附加到身体上

$this.popover({html:true,title:event.title,placement:'top',container:'body'}).popover('show');
Run Code Online (Sandbox Code Playgroud)


dav*_*dav 13

这段代码对我有帮助

$('#calendar').fullCalendar({
    eventRender: function (event, element) {
        element.popover({
            title: event.name,
            placement: 'right',
            content: + '<br />Start: ' + event.starts_at + '<br />End: ' + event.ends_at + '<br />Description: ' + event.description,
        });
    }
});
Run Code Online (Sandbox Code Playgroud)

bootstrap version - 2.3.2,完整日历 - 1.6.4

摘自https://groups.google.com/forum/#!topic/twitter-bootstrap-stackoverflow/9pkC3_lodmY