gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-28 15:24:34 25 4
gpt4 key购买 nike

更新新版本后,我的 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com