Recurring Overnight Events in FullCalendar

情到浓时终转凉″ 提交于 2019-12-24 11:35:18

问题


I am using the FullCalendar plugin for JQuery, and I am trying to create a recurring event that spans multiple days. In this instance I want a recurring event that starts at 10am Monday and ends at 3am Tuesday.

I have researched how to do recurring events, such as this, but I can't seem to get it to work across multiple days.

For example, creating a recurring event on the same day like this works fine:

{
  start: '10:00',
  end:   '15:00',
  dow: [1]
}

However, trying to span the event overnight doesn't work ( I mean Monday 10:00 to Tuesday 03:00 ):

{
  start: '10:00',
  end:   '03:00',
  dow: [1]
}

It just seems to create a 2-hour event.

Is it possible to do what I want? And if so, how?


回答1:


The answer I gave on the page you linked (here) should work. You just need to use the right times.

This won't work

{
  start: '10:00', //starts at 10 on monday
  end:   '03:00', //ends at 3 on monday? gets ignored
  dow: [1]
}

Instead:

{
  start: '10:00', //starts at 10 on monday
  end:   '27:00', //24+3 is handled correctly.
  dow: [1]
}

JSFiddle Demo



来源:https://stackoverflow.com/questions/32136130/recurring-overnight-events-in-fullcalendar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!