fullcalendar - 如何在工具提示中显示 HTML 格式的内容? (用户界面日历)

标签 fullcalendar angular-ui-bootstrap

我正在尝试在 UI 日历的日历条目的工具提示中显示多行内容,但它不起作用。

这是代码

$scope.onEventRender = function(event, element, view) {
    if(event.hover_data) {
        $timeout(function(){
            var hdata = event.hover_data.join('<br />');
            element.attr({'tooltip': hdata, 'tooltip-append-to-body': true});
            $compile(element)($scope);
        });
    }
}

这是它的外观

enter image description here

请让我知道我做错了什么。

最佳答案

ui-calendar 中没有工具提示功能。您可能正在使用 bootstrap-ui-tooltip。除了tooltip它还有一个属性 tooltip-html-unsafe (自 2013 年 5 月 1 日发布的 v0.3.0 起),最近对其进行了重命名。
您可以在 some old documenatation 中阅读有关它的信息

我做了一个 plunker带有 html 内容工具提示

关于fullcalendar - 如何在工具提示中显示 HTML 格式的内容? (用户界面日历),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33384277/

相关文章:

fullcalendar - moment().format() 和 fullcalendar : undefined is not a function

c# - 将 Mysql 数据填充到 asp 日历加载时间太长

javascript - 使用两个模态时出错 : [$injector:unpr] Unknown provider: $modalInstanceProvider <- $modalInstance

angularjs - Angular UI bootstrap Accordion - 展开创建可滚动和页面 "jump"

javascript - 全日历,columnFormat html

jquery - Fullcalendar限制显示可用月份?

angularjs - Angular UI Bootstrap 中的分页抛出 "Error: [$compile:nonassign]"

html - 为什么我不能将所有 4 个元素都放在同一行中?

javascript - 全日历的垂直网格线

angularjs - UIBootstrap datePicker 中的初始日期