如何从 FullCalendar 中的事件获取弹出消息中事件的开始和结束时间?

How to get start and end time of event in popover message from an event in FullCalendar?

当鼠标悬停在 monthView of [=16] 中的事件上时,我想将每个事件的 startend 时间显示为 popover 消息=].

我有以下内容:

element.popover({
    content: event.start,
    animation: true,
    delay: 300,
    content: event.start + event.end,
    trigger: 'hover',
    placement: 'top',
    container: 'body'
});

当我在 content 中有 event.startevent.end 时,我通过以下方式正确获得 datetimeWed May 09 2018 08:00:00 GMT +0000.但是当我在 content 中有 event.start + event.end 时,我得到一个模糊的数字:3051738000000

假设 start09:00:00,而 end15:00:00。我想要消息说:

Start: 9AM
End: 3PM

我该怎么办?

startdate 的格式需要正确。 Displaying format 显示正确的 format。感谢@ADyson 的 link! (看评论)。此外,要在内容中启用 html,我们需要设置 html: true,

element.popover({
    animation: true,
    delay: 300,
    trigger: 'hover',
    placement: 'top',
    html: true,
    container: 'body',
    content: '<p>' + 'Start: ' + event.start.format('h:mm a') + '</p><p>' + 'End: ' + event.end.format('h:mm a') + '</p>'

});