I have a node with a date field.

This field should be able to accept...

- A single date
- Multiple Dates
- Recurring Dates

However, after enabling "recurring dates", the "add more button" is now gone.

Without ticking "repeat" (as it is not a repeating date, and there isn't an "end date" or "max number of dates") - how can I add multiple dates?

Comments

Collins405 created an issue.

Collins405’s picture

So it looks like the date repeat module is stripping the add more functionality.

Temporarily removing this on line 86 of date_elements.inc brought back the add more functionality.

  if (!empty($field['settings']['repeat']) && module_exists('date_repeat_field')) {
    if ($delta == 0) {
      $form['#after_build'][] = 'date_repeat_after_build';
      $form_state['storage']['repeat_fields'][$field_name] = array_merge($form['#parents'], array($field_name));
      $form_state['storage']['date_items'][$field_name][$langcode] = $items;
    }
    else {
      return;
    }
  }

It all seems to work with this removed. Perhaps this should be an optional thing.