2011-05-20 59 views
0

如何在每年的每个星期日举办活动而无需为每个星期日创建活动。经常性事件每年的每个星期日

+0

提取有使用回调,为创造更加源[这里]一个非常好的解决方案(http://stackoverflow.com/questions/11072616/fullcalendar-jquery-repeat-every-monday)。 – 2012-07-18 15:01:41

回答

1

在从fullcalendar基本方法:

你必须创建在周日的事件和重复每个星期(不希望):

  { 
       id: 999, 
       title: 'Repeating Event', 
       start: new Date(y, m, d+7, 16, 0), // "d" must be start on sunday and be incremented by 7 each event 
       allDay: false 
      }, 

在先进的方法从fullcalendar:

你有动态创建自己的日历Feed,然后创建一个周期性事件:

<entry xmlns='http://www.w3.org/2005/Atom' 
    xmlns:gd='http://schemas.google.com/g/2005'> 
    <category scheme='http://schemas.google.com/g/2005#kind' 
    term='http://schemas.google.com/g/2005#event'></category> 
    <title type='text'>Tuesday Tennis Lessons with Jane</title> 
    <content type='text'>Meet on Tuesdays for a quick lesson.</content> 
    <gd:transparency 
    value='http://schemas.google.com/g/2005#event.opaque'> 
    </gd:transparency> 
    <gd:eventStatus 
    value='http://schemas.google.com/g/2005#event.confirmed'> 
    </gd:eventStatus> 
    <gd:where valueString='Rolling Lawn Courts'></gd:where> 
    <gd:recurrence>DTSTART;VALUE=DATE:20100505 
DTEND;VALUE=DATE:20100506 
RRULE:FREQ=WEEKLY;BYDAY=Tu;UNTIL=20100904 
</gd:recurrence> 
</entry> 

代码从http://code.google.com/intl/fr-FR/apis/calendar/data/2.0/developers_guide_protocol.html#CreatingRecurring

+0

这有效......但它只显示一次......确实得到了今年的所有星期日...... – Ennio 2011-05-20 16:23:40

+0

您是否尝试过使用我的GCal解决方案? – Doomsday 2011-05-23 14:54:29

相关问题