javascript - 在月 View 中剪切事件的结束时间

标签 javascript jquery fullcalendar

更新新版本后,我的 fullCalendar 出现一些问题。 如果事件结束时间早于上午 9 点,则事件最后一天将被缩短。

我的 fullCalendar 初始化:

$('#calendar').fullCalendar({
   header: {
       left: 'prev,next today',
       center: 'title',
       right: ''
   },
    editable: false,
    events: [
        {
            "title":"normal 3 days event",
            "start":"2015-04-13T08:00:00",
            "end":"2015-04-15T09:00:00"},
        {
            "title":"cutted 3 days event",
            "start":"2015-04-19T01:00:00",
            "end":"2015-04-21T08:00:00"}],
    timeFormat: ' '//for hiding of event's start time
});

另外,我提供 fiddle有 2 个事件。第一个的结束时间晚于上午 8 点并且工作正常,第二个已被剪切。

我认为问题出在时区上,并尝试添加时区:“UTC”,但这对我没有帮助。

最佳答案

nextDayThreshold相关而不是时区。 默认情况下,如果多日事件在 09:00 之前结束,则不会显示。如果您想显示每个事件,只需将其设置为 00:00:00 即可。

$('#calendar').fullCalendar({
   header: {
                left: 'prev,next today',
                center: 'title',
                right: 'month, agendaWeek' //You can check it adding new views
            },
    editable: false,
    nextDayThreshold : "00:00:00", //Add this line
    events: [{"title":"New Franchisee Training","location":"Hastings, MN","start":"2015-05-11T08:00:00","end":"2015-05-15T11:00:00","color":""},{"title":"Vitals Training","location":"PL","start":"2015-05-19T01:00:00","end":"2015-05-21T05:00:00","color":""}],
                timeFormat: ' ',
            timezone: 'UTC'
});

我已经 fork 了你的 fiddle 。我还在不同的 View 中添加了按钮,这样您就可以轻松检查。

关于javascript - 在月 View 中剪切事件的结束时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29605467/

相关文章:

javascript - WordPress 插件中的 jQuery 未定义函数创建了 fullCalendar

javascript - FullCalendar 提高了渲染事件的性能

jquery - 如何在 jQuery FullCalendar 上单独显示事件的时间(没有标题)?

javascript - 使用 react-redux 将调度函数映射到属性

javascript - 有没有办法创建变量的名称并从循环中进行更改?

javascript - Highcharts 中的最小值不起作用

javascript - 仅将 CSS 规则应用于 <tr> 中的第一个 <td> 而不分配类/id?

javascript - Flash 在其模糊滤镜中内部使用什么模糊算法

javascript - 放大 - 缩小 Javascript 背景上的问题

javascript - 如何更改 "progress[value]::-webkit-progress-value"属性的颜色?