2011-05-20 60 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

相關問題