diff -Ndaur a/date_single_day.module b/date_single_day.module --- a/date_single_day.module 2010-05-26 23:21:05.000000000 +0300 +++ b/date_single_day.module 2010-08-24 02:54:15.771740478 +0300 @@ -13,7 +13,7 @@ * Cribbed from http://www.gizra.com/content/hookwidgetsettingsalter-and-pandora */ function date_single_day_widget_settings_alter(&$settings, $op, $widget) { - $widget_types = array('date_popup'); + $widget_types = array('date_popup','date_popup_repeat'); if ((!empty($widget['type']) && in_array($widget['type'], $widget_types)) || (!empty($widget['widget_type']) && in_array($widget['widget_type'], $widget_types))) { switch ($op) { case 'form': @@ -50,10 +50,15 @@ // Alter each value of a potentially multiple valued field. // Note we don't use element_children() because that catches the // 'add more' button. - foreach (array_keys($form[$field_name]) as $key) { - if (is_numeric($key)) { - $form[$field_name][$key]['#after_build'][] = 'date_single_day_after_build'; - $form[$field_name][$key]['#theme'][] = 'date_single_day_element'; + if ( isset($form[$field_name]['rrule']) ){ + $form[$field_name]['#after_build'][] = 'date_single_day_after_build'; + $form[$field_name]['#theme'][] = 'date_single_day_element'; + } else { + foreach (array_keys($form[$field_name]) as $key) { + if (is_numeric($key)) { + $form[$field_name][$key]['#after_build'][] = 'date_single_day_after_build'; + $form[$field_name][$key]['#theme'][] = 'date_single_day_element'; + } } } } @@ -121,7 +126,10 @@ $form['value2']['time']['#title'] = 'To time'; $output .= drupal_render($form['value2']['time']); - + if ( isset($form['rrule']) ) { + $output .= drupal_render($form['rrule']); + } + $output .= ''; return $output;