There is a Date Repeat API (bundled with the Date module) available that creates a form to select a repeat rule and to compute the dates that match that rule. Repeat rules use the iCal RRULE standards to create a string that represents all the characteristics of the repeat.

The CCK Date module implements the Date Repeat API to create repeating CCK dates. All CCK date fields and widgets can become repeating dates. Add or edit the field and scroll down to where you select the number of multiple values. If the Date Repeat API is enabled, you will see 'repeating' as an alternative to allowing 'unlimited' multiple values. In the 6.2 version the option is labeled 'Number of values'. In the 5.2 version it is labeled 'Multiple'.

Comments

brush’s picture

Near as I can tell, the way you activate the Date Repeat API on a field has changed, at least for Date 6.x-2.1 and CCK 6.x-2.2.

Edit the Content Type -> Fields -> Manage Fields -> {Specific Field}

Then near the top click on "Edit basic information", and change the drop-down menu for Widget Type to (eg.) "Text Field with Date Pop-up and Repeat options".

ak112358’s picture

In these later versions the "multiple values" field disappears when you select a widget that includes the "repeat options".
I was silly enough to still look for it...

uufsm’s picture

This may not happen all the time or for all systems, but I had the Date field inside a display group on a node, and after I enabled REPEAT, the Date field was only partially visible, so you couldn't enter information. I took Date out of the display group and it worked fine.

odecuas’s picture

i have successfully set repeat for dates like birthdays: where date falls on same "day" each year, regardless of day-of-week. However in trying to setup dates where it falls on same day of year (Thanksgiving), the repeat function seems to fail for me. Here is the rule that prints out on the "repeat" tab of the node:

Repeats every year on November on the last Thursday until Thu Nov 28 2019 .
26 November, 2009 - 01:00

I see no repeats under this tab (as i see in BDay nodes) and none on the Calendar as well. My setup for this node was:
Repeat Every Year Until (thursday of 2019)
Month: November
Day of Month: -Any
Day of Week: -Last Thursday (i have tried things like "first Thursday" with same results - no repeats)

Thx,
-o
-have latest drupal 6.xx, Date, Calender, cck, views modules as of today-

asiby’s picture

I know that this is a very old topic, but why are you guys looking for the "Last Thursday" of the week if there is only one Thursday in any given week?

Live long ... and prosper!

Serris’s picture

obviously they want the last thursday of the month, and day of the week is the only place that let's you enter thursday.

uufsm’s picture

If your event lasts all day, you can set both time fields to 12:00 AM and it will display as (All day).

(Before I enabled Date Repeat, having the times set to the same value would display as ALL Day, but after I enabled Repeat, the time needed to be 12:00 am)

larowlan’s picture

To use the date_repeat FAPI element in D6, you must make sure your field is a child of another field and has a name of rrule. The parent field must have '#tree' => TRUE
Eg

   $form['repeat_rule'] = array(
        '#type' => 'date_repeat_rrule',
        '#default_value' => isset($instance->repeat_rule) ? $instance->repeat_rule : '',
        '#date_timezone' => date_default_timezone_name(),
        '#date_format'      => variable_get('date_format_short', 'm/d/Y - H:i'),
        '#weight' => -9,
        '#date_year_range' => '-0:+1',    
        '#date_repeat_widget' => 'date_popup_repeat',
        '#date_repeat_collapsed' => TRUE,
      );

won't work but

   $form['date'] = array(
      '#tree' => TRUE
   );
   $form['date']['rrule'] = array(
        '#type' => 'date_repeat_rrule',
        '#default_value' => isset($instance->repeat_rule) ? $instance->repeat_rule : '',
        '#date_timezone' => date_default_timezone_name(),
        '#date_format'      => variable_get('date_format_short', 'm/d/Y - H:i'),
        '#weight' => -9,
        '#date_year_range' => '-0:+1',    
        '#date_repeat_widget' => 'date_popup_repeat',
        '#date_repeat_collapsed' => TRUE,
      );

will

Lee Rowlands

--author="larowlan <larowlan@395439.no-reply.drupal.org>"
drupalfan2’s picture

Date Repeat API is great, but when I display all event nodes in a view listing everytime the first date is shown.

This is not what we want.

Is there a patch to solve this?
E.g.: an event, every monday, from may to august. With repeat form it is no problem to create this node with date field an repeating dates.

No showing this events in a simple node view there are several views entry. Each of this views entrys shows exact the first date of this event.

What we need: First view entry shows first date, second views entry shows second date (repeated date), third views entry shows third date, and so on.

How this can be achieved? Patch? PHP code in view-....-tpl.php?
Thanx.

Anonymous’s picture

I've set a repeat for a deadline that occurs every two weeks. In my Deadline Calendar (using Calendar Views), all the repeats show up for each date. For example, one deadline is set to repeat every two weeks and it displays as follows:
-APPR deadline
July 21
Aug 8
Aug 18
- Client X Web launch
July 29
- APPR deadline
July 21
Aug 8
Aug 18

How can I get it to just show me the current deadline each time? for example:
-APPR deadline
July 21
- Client X Web launch
July 29
- APPR deadline
Aug 8

WeRockYourWeb.com’s picture

We have the same exact problem as DrupalFan in his comment above using the latest 5.x releases of CCK, Date, Views, and Calendar. Specifically, it appears that the repeating events are only flagged as dates - no separate node is created. As a result, when we click on a future repeating date for a particular event, we are always taken to the original node/date, which is now in the past. It appears that repeating dates can only be accessed via the "repeating" tab and the teaser in the calendar. Is there a workaround for this in 6.x?

Update - I found an add-on module for 6.x that appears to tackle this issue (creating a separate node for each repeating event), but in the moment it appears to be sitting on the back burner in incomplete production status.

Rainy Day’s picture

We are having the same problem. It would be nice if the repeat function worked like iCal, allowing you to spawn a new node-clone as needed. I’m really surprised that so many people seem to be satisfied with the repeat function as it currently exists. Seems next to useless to me, without the ability to make changes in subsequent entries, or even to correctly display the date of any but the first event.

Regarding the Date Repeat Node Generator module, that appears to be dead.

The iCal module looks like a possible solution.

MacaroniDuck’s picture

I share the surprise at the fact that the Date Repeat API does not appear to create separate (therefore viewable and editable) nodes. The purpose, in most uses I've been exposed to, of having recurring events is so that you can quickly clone an event while allowing for unique information and responses (RSVPs, comments, etc.) to each (ala Evite, Meetup, Google Calendar, just a few web-based examples). Utilizing Drupal Commons with a few bits of customization, our community organization has exactly what we need, EXCEPT for "properly" functioning recurring event generation.
I'm definitely interested in hearing of any potential solutions to this issue.

Crom’s picture

Same problem as above poster...subscribing

CJBrew’s picture

I have been looking this evening for a solution to the problem where you have a set of repeating date events and want to modify just one of that sequence.

On my website's calendar are rehearsals every Thursday for most of the year with a number of exclusions. Typically we will find out a week or so before a rehearsal that the venue has changed. So I should either edit the calendar item or create a new one with the updated info and create an exclusion on the repeat rule for that date. (But in reality the latter is far too clunky...)

I found this evening that I am unable to modify the exclusions -- as soon as I edit the node with repeating dates the end-date and all excluded dates disappear!!!

Repeating date is useless, at least for me.

So I wonder whether this is the solution: http://drupal.org/project/node_repeat

I've not tried it yet. Bedtime.
/subscribing

MacaroniDuck’s picture

CJ, did you ever try node_repeat? I found it in my original search but was hesitant to use something that had only 11 commits, hadn't been updated in over a year and didn't appear to be used much. As many people as there are seeking a solution for this, I would think there would be more buzz about that module if it provided a solution. Here's hoping it's a 'best kept secret' and you've found that it works wonderfully.....

kfrank’s picture

I would love to see a solution to this, too.

In the meantime, I created a new template file for my "Event" node type and used this Javascript to strip out the old year and replace it with the current year. Not an expert at Drupal or Javascript, but this solved my problem for the time being.

<script type="text/javascript">
function newdate(){
doclabs = new Array;
doclabs = document.getElementsByClassName('date-display-single');
if (doclabs.length) {
  for (i=0; i<doclabs.length; i++ ){
    labtext = doclabs[i].innerHTML;
    if (labtext.indexOf("2010")) {
      striptext = labtext.substr(0, labtext.indexOf("2010")) + "2011" + labtext.substr(labtext.indexOf("2010")+4, labtext.length);
      doclabs[i].innerHTML = striptext;
    }
  }
}
}
onload=newdate;

</script>
satter9’s picture

Hello,
We are willing to pay for the following customization if anyone is interested. I have been developing a site where a restaurant enters their daily specials. The Calendar module works great but the only thing users are finding confusing is how to add a date and then set that special to repeat on certain dates (even though it is completely possible). We want to customize it so you first enter the date and time when the first special will occur, then an expandable link "repeat dates" is shown. When clicked it expands to show check boxes for each day of the week. An example would be setting the alarm on your phone. You set the time and then you can just check the days of the week you want the alarm to go off.

If it requires custom work on the calendar module please give me a quote and we will go from there.

Thanks
Nils

nevets’s picture

You should really post questions in the forums. You might also check the Simple Date Repeat module.

El Bandito’s picture

This module should be of interest to the first bunch of posters as it generates nodes from repeating dates :

http://drupal.org/project/date_repeat_sequence

barbbar’s picture

Thought I'd document what we figured out to do to get the "node" we link to from calendars/event lists to show the actual date of the instance instead of the first date in the repeating series.

  1. Created a page view for a single event:
    • Standard Stuff:
      • Format: Unformatted List
      • Show: Content : Full Content
      • Filter Criteria: Published, Content Type = Event
    • Contextual Filter:
      • Content: Date/Time - be sure "Add Multiple value identifier" is set to Yes
      • Content: Nid
    • Path: /event/%/%
  2. Modified Calendar views:
    • Added Fields for NID and Date/time in format 20120729, setting display to "none" and putting them first in the field list
    • Changed the title field to point to a URL of the format /event/20120729/62 [ Under rewrite rules, click "Output this field as a link" and for Link path use
      event/[field_start_date_1]/[nid] where "[field_start_date_1]" is replaced with whatever field your date/time in the format 201207019 is called.
Anonymous’s picture

This worked for me. Thanks