Hi and thanks in advance.

The staff member who inputs our events tells me she used to have the capability to create multiple exceptions for a repeating date and now can only enter one.

I have looked for where I might have changed a setting or the default has changed from unlimited to one... but don't see where to check this.

Thanks-

CommentFileSizeAuthor
#24 date_repeat-560054-24.patch4.16 KBtravist

Comments

rbrownell’s picture

I am having the exact same problem as well. I can't find an area that has mutiple exceptions. Have you found a solution yet?

rbrownell’s picture

Status: Active » Closed (fixed)

Just found a solution... It is kind of stupid. Just click on Save and then scroll back down to the exceptions section and add the next date, and click save. (wash and repeat as many times as necessairy)

rbrownell’s picture

Title: Multiple Exceptions Missing? » Create Multiple Exceptions Without Saving Node with Every Exception
Category: support » feature
Priority: Normal » Critical
Status: Closed (fixed) » Active
rbrownell’s picture

Title: Create Multiple Exceptions Without Saving Node with Every Exception » Create Multiple Exceptions Without Saving Node for Every Exception
arlinsandbulte’s picture

Version: 6.x-2.3 » 6.x-2.4
Priority: Critical » Normal
my-family’s picture

subscribe

Alex Andrascu’s picture

+1

traviscarden’s picture

+1 subscribing

aww’s picture

This is definitely an important feature request.

I built a site for an elementary school that requires frequent updates to the calendar with various events. There does not seem to be an easy way to exclude weekends for month-long happenings. To have to refresh the page on each exception entry just aggravates the situation for the poor staff.

Multiple Exception fields, or, an "Exclude Weekends" option should be a basic feature.

delapohl’s picture

+1 subscribing

todd zebert’s picture

subscribe

locomo’s picture

subscribe

meganedesigns’s picture

subscribe

SuperStes’s picture

subscribing

hnln’s picture

subscribe

baff’s picture

subscribe

MBroberg’s picture

I agree, but for excluding weekends can you just use the advanced settings and choose "every Monday, Tuesday, Wednesday, Thursday, and Friday?"

not_Dries_Buytaert’s picture

Title: Create Multiple Exceptions Without Saving Node for Every Exception » Create and remove multiple repeat exceptions (without needing to save node for every exception)
Version: 6.x-2.4 » 6.x-2.6

The current solution (workaround?) is not friendly to users and unnecessarily costs performance.

A "remove exception" link for each existing exception and a single "add new exception" link is needed within the "Except" group fields.

@'aww': An "Exclude Weekends" is really not desirable imo, since definitely not only weekends could be exceptions.

BTW: I marked http://drupal.org/node/333619 as being a duplicate.

not_Dries_Buytaert’s picture

I think the issue can be solved in lines 164+ within the file 'date\date_repeat\date_repeat_form.inc':

  $element['exceptions'] = array(
    '#type' => 'fieldset',
    '#collapsible' => TRUE,
    '#collapsed' => empty($exceptions) ? TRUE : FALSE,
    '#title' => t('Except'),
    '#description' => t('Dates to omit from the list of repeating dates.'),
    '#prefix' => '<div class="date-repeat">',
    '#suffix' => '</div>',
    );
  $max = !empty($exceptions) ? sizeof($exceptions) : 0;
  for ($i = 0; $i <= $max; $i++) {
    $EXCEPT = '';
    if (!empty($exceptions[$i]['datetime'])) {
      $EXCEPT = $exceptions[$i]['datetime'];
    }
    $element['exceptions']['EXDATE'][$i] = array(
      '#tree' => TRUE,
      'datetime' => array(
        '#type' => $element['#date_repeat_widget'],
        '#default_value' => $EXCEPT,
        '#date_timezone' => !empty($element['#date_timezone']) ? $element['#date_timezone'] : date_default_timezone_name(),
        '#date_format' => !empty($element['#date_format']) ? $element['#date_format'] : 'Y-m-d',
        '#date_text_parts'  => !empty($element['#date_text_parts']) ? $element['#date_text_parts'] : array(),
        '#date_year_range'  => !empty($element['#date_year_range']) ? $element['#date_year_range'] : '-3:+3',
        '#date_label_position' => !empty($element['#date_label_position']) ? $element['#date_label_position'] : 'within',
        ),
      'tz' => array('#type' => 'hidden', '#value' => $element['#date_timezone']),
      'all_day' => array('#type' => 'hidden', '#value' => 1),
      'granularity' => array('#type' => 'hidden', '#value' => serialize(array('year', 'month', 'day'))),
      );
  }

A workaround may be to change the multilingual (!) help text of the "Except" field from:

Dates to omit from the list of repeating dates.

to:

Dates to omit from the list of repeating dates. To add additional exceptions to repeating dates, save and then again edit the node.

michellezeedru’s picture

Subscribing

danihobbs’s picture

Would be great to see a global exception list as well - for instance all events site wide do not recur on major holidays unless specifically set. Subscribe!

not_Dries_Buytaert’s picture

@DaniHobbs: please submit a separate issue for your feature request (in post #21).

karens’s picture

The fix is to add AHAH 'add more' handing to this widget, which I haven't had time to do. If anyone wants to make a patch that would be great.

travist’s picture

Status: Active » Patch (to be ported)
StatusFileSize
new4.16 KB

Hello KarenS,

This was an itch that the good people at AllPlayers.com needed to scratch.

Here is the patch I wrote that adds an AHAH "Add more" button to the exceptions. Please let me know if this works for you.

Thanks,

Travis Tidwell

travist’s picture

Status: Patch (to be ported) » Needs review
karens’s picture

Bless you!!! I will take a look.

karens’s picture

Status: Needs review » Fixed

This is great! I tweaked it up to work for both exceptions and additions and committed it. Thanks!

travist’s picture

Nice! I just took a look and the additions piece is great!

I am glad I could help out.

Thank you so much for your module.

Travis Tidwell.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.