【问题标题】:Fullcalendar Rendering Popover/Tooltip issueFullcalendar 渲染弹出框/工具提示问题
【发布时间】:2015-01-16 17:15:25
【问题描述】:

我已经导入了全日历插件,我正在尝试通过在选定事件上添加弹出框/工具提示来修改视图。 但是内容大的弹出框被部分隐藏了。 请参考附图以获得更好的理解。

我已附加此代码以获得所需的效果。 Javascript:

$('#calendar').fullCalendar({   
        eventMouseover: function(calEvent, jsEvent, view) {         
        // change the border color just for fun
        $(this).css('border-color', 'red');
        $(this).find(".fc-content").attr({"data-toggle":"popover","title":calEvent.title,"data-content":calEvent.title});
        $(this).find(".fc-content").click(function(){$(this).popover('show');},function(){$(this).popover('hide');});
    });

【问题讨论】:

    标签: fullcalendar


    【解决方案1】:

    这是一个引导问题,而不是一个完整的日历问题。 正如你在这里看到的:Bootstrap popover not showing on top of all elements 只需添加到 .attr "data-container": "body"。

    所以:

    $(this).find(".fc-content").attr({"data-toggle":"popover","title":calEvent.title,"data-content":calEvent.title});
    

    应该是:

    $(this).find(".fc-content").attr({"data-toggle":"popover","title":calEvent.title,"data-content":calEvent.title, "data-container": "body"});
    

    【讨论】:

    • 非常感谢。它帮助了。
    • 但是如果日历被滚动或调整大小,弹出框不会与事件一起重新定位并且看起来有问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-12
    • 2012-04-08
    • 2017-02-08
    • 2015-08-07
    • 2012-07-20
    • 1970-01-01
    相关资源
    最近更新 更多