我正在尝试将工具提示添加到fullcalendar。我使用角度2模块(ap-angular2-fullcalendar)。工具提示需要以编程方式创建,以便工具提示内容与事件内容匹配(例如:描述)。
我尝试使用 qtip 和材质MatToolTip 库,但没有成功(我设法将工具提示添加到DOM,但它无效)。
答案 0 :(得分:0)
您需要使用eventRender,例如
eventRender: function(eventObj, $el) {
$el.popover({
title: eventObj.title,
content: eventObj.description,
trigger: 'hover',
placement: 'top',
container: 'body'
});
},
查看有效的示例here-请注意,该示例依赖于Bootstrap和Popper.js
您也可以使用Bootstrap工具提示来代替弹出窗口,例如
eventRender: function(event, element) {
$(element).tooltip({title: event.tooltip,
container: 'body',
delay: { "show": 500, "hide": 300 }
});
},