? date_jumper.diff
Index: event.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/event/event.module,v
retrieving revision 1.183.2.10
diff -u -p -r1.183.2.10 event.module
--- event.module	14 Nov 2006 08:53:04 -0000	1.183.2.10
+++ event.module	19 Jan 2007 13:31:33 -0000
@@ -215,6 +215,11 @@ function event_settings() {
     '#title' => t('Content type filter controls'), '#default_value' => variable_get('event_type_control', 'all'),
     '#options' => array('all' => t('Show content type filter control on calendar views'), 'request' => t('Only show content type filter control when content type filter view is requested'), 'never' => t('Never show content type filter control')));
 
+  $form['event_overview_options']['event_date_control'] = array(
+    '#type' => 'radios',
+    '#title' => t('Jump-to-date control'), '#default_value' => variable_get('event_date_control', 'all'),
+    '#options' => array('all' => t('Show jump-to-date control on calendar views'), 'never' => t('Never show jump-to-date control')));
+
   return $form;
 }
 
@@ -250,6 +255,10 @@ function event_page($year = NULL, $month
     drupal_goto('event/'. $year .'/'. $month .'/'. $day .'/'. $view .'/'. ($types ? $types : 'all') .'/'. $_POST['edit']['event_term_select']);
   }
 
+  if ($_POST['edit']['event_year_select'] || $_POST['edit']['event_month_select']) {
+    drupal_goto('event/'. $_POST['edit']['event_year_select'] .'/'. $_POST['edit']['event_month_select'] .'/'. $_POST['edit']['event_day_select'] .'/'. $view .'/'. ($types ? $types : 'all') .'/'. ($tids ? $tids : 'all'));
+  }
+
   $breadcrumbs[] = l(t('Home'), NULL);
   $breadcrumbs[] = l(t('Events'), 'event');
   $links = array();
@@ -309,6 +318,10 @@ function event_page($year = NULL, $month
   if (variable_get('event_type_control', 'all') == 'all' || (variable_get('event_type_control', 'all') == 'request' && isset($types))) {
     $output .= _event_get_type_control($types);
   }
+  // add date jump controls to top of calendar
+  if (variable_get('event_date_control', 'all') == 'all') {
+    $output .= _event_get_date_control($day, $month, $year);
+  }
 
   switch ($view) {
     case 'day':
@@ -1667,6 +1680,45 @@ function _event_get_type_control($curtyp
 }
 
 /**
+* Returns a dropdown date jump input control.
+*
+* @ingroup event_support.
+* @param $tid The current term id.
+* @param $submit Adds 'onChange' form submit javascript command to control.
+* @return A form with a dropdown event taxonomy term input control.
+*/
+function _event_get_date_control($curday = NULL, $curmonth = NULL, $curyear = NULL) {
+
+  $days = drupal_map_assoc(range(1,31));
+  $months = array(1 => t('January'), t('February'), t('March'), t('April'), t('May'), t('June'), t('July'), t('August'), t('September'), t('October'), t('November'), t('December'));
+  $year_min = gmdate('Y', variable_get('event_range_prev', 0));
+  $year_max = gmdate('Y', variable_get('event_range_next', 0));
+  $years = drupal_map_assoc(range($year_min, $year_max));
+
+  $form['event_day_select'] = array(
+    '#prefix' => '<div class="container-inline">',
+    '#type' => 'select',
+    '#default_value' => $curday,
+    '#options' => $days);
+  $form['event_month_select'] = array(
+    '#type' => 'select',
+    '#default_value' => $curmonth,
+    '#options' => $months);
+  $form['event_year_select'] = array(
+    '#type' => 'select',
+    '#default_value' => $curyear,
+    '#options' => $years);
+  $form['submit'] = array(
+    '#type' => 'submit',
+    '#value' => 'Go to date',
+    '#suffix' => '</div>');
+
+  $form = drupal_get_form('event_date_jump', $form);
+
+  return theme('event_date_control', $form);
+}
+
+/**
  * @defgroup event_block Functions for event blocks.
  */
 
Index: event.theme
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/event/event.theme,v
retrieving revision 1.26.2.6
diff -u -p -r1.26.2.6 event.theme
--- event.theme	23 Aug 2006 20:00:03 -0000	1.26.2.6
+++ event.theme	19 Jan 2007 13:31:35 -0000
@@ -390,6 +390,16 @@ function theme_event_filter_control($for
 }
 
 /**
+ * Format the event date jump dropdown
+ *
+ * @param form
+ *   The form containing the date jump controls
+ */
+function theme_event_date_control($form) {
+  return '<div class="event-date-control">'. $form .'</div>';
+}
+
+/**
  * Format the 'next' navigation controls for event calendars
  *
  * @param link
