fullCalendar多日活动超过1天太短 [英] fullCalendar multi-day event spans 1 day too short

查看:923
本文介绍了fullCalendar多日活动超过1天太短的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户将活动添加到日历时,他们选择开始:2014-09-17结束:2014-09-18。很简单,他们希望事件能够延伸到日历上的第17和第18盒,但它只出现在9月17日,使其显示为1天的事件。



<在事件管理器数据库9-17和9-18中输入正确。我试着改变fullCalendar插件的nextDayThreshold选项,但事件仍然只跨越了sept。 17。我可以在后端添加一天,但这会导致其他问题,我宁愿在客户端进行操作,仅用于显示目的。



有什么方法可以改变这种行为?

谢谢。

  $(#cal)。fullCalendar({
events:[
{
'title':'test2',
'start':'2014-09-17',
'end':'2014-09-18'
}
],
nextDayThreshold:00:00 :00
});


解决方案

没有fullDayThreshold,我认为您指的是nextDayThreshold,请查看文档:

http:/ /fullcalendar.io/docs/event_rendering/nextDayThreshold/



应该这样做。问候。



编辑:您应该为日期添加时间以使该选项有效。示例:

  {
'title':'test2',
'start':'2014- 09-17T00:00:00',
'end':'2014-09-18T01:00:00'
},


When users add an event to the calendar, they choose start: 2014-09-17 end: 2014-09-18. Simple enough, they expect the event to extend across both the 17th and 18th boxes on the calendar, but it only appears in Sept 17th, making it appear a 1-day event.

In the events manager database 9-17 and 9-18 are entered correctly. I tried changing the nextDayThreshold option of the fullCalendar plugin, but the event still only spans across sept. 17th. I could add a day on the back end, but this causes other issues, I'd rather do it client-side, for display purposes only.

Any way to change this behavior?

thanks.

$("#cal").fullCalendar({
    events:[
        {
            'title':'test2',
            'start':'2014-09-17',
            'end':'2014-09-18'
        }
    ],
    nextDayThreshold: "00:00:00"
});

解决方案

There is no fullDayThreshold, I think you are referring to nextDayThreshold, check documentation here:

http://fullcalendar.io/docs/event_rendering/nextDayThreshold/

That should do it. Regards.

Edit: You should add time to your dates for that option to work. Example:

            {
                'title':'test2',
                'start':'2014-09-17T00:00:00',
                'end':'2014-09-18T01:00:00'
            },

这篇关于fullCalendar多日活动超过1天太短的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆