Here is some info to help narrow down the trouble.

I commented out one line in the calendar.module and now I don't have a stray date in the month view. I might do the same for the week view except I have already disabled the week view so it doesn't affect me at this time.

The next thing I might do is to modify this function to show and format the time from the date field. I think this would look nice in the month view.

Here is a copy of the function with one line commented out. Hope this helps.

/**
 * Format an calendar node for display in an expanded calendar, like a calendar page
 *
 * @param node
 *   The node being displayed
 */
function theme_calendar_node_month($node) {

  $output .= '<div class="calendar monthview">'."\n";
  $output .= theme('calendar_stripe_stripe', $node);

  if ($node->calendar_start != $node->calendar_end && $node->start_time_format) {
    $start_label = t('Start: ');
    $end_label = t('End: ');
  }
  else {
    $start_label = '';
    $end_label = '';
  }

  switch ($node->calendar_state) {
    case 'singleday':
      if ($node->start_time_format != $node->end_time_format) {
        $times = '<div class="start">'. $start_label . $node->start_time_format .'</div>'."\n";
      }
      if ($node->calendar_start != $node->calendar_end && $node->calendar_end) {
        $times .= '<div class="end">'. $end_label . $node->end_time_format .'</div>'."\n";
      }
      else {
        $times = '<div class="start">'. $node->start_time_format .'</div>'."\n";
      }
      break;
    case 'start':
        $times = '<div class="start">'. $start_label . $node->start_time_format .'</div>'."\n";
      break;
    case 'end':
        $times = '<div class="end">'. $end_label . $node->end_time_format .'</div>'."\n";
      break;
    case 'ongoing':
        $times = '<div class="ongoing">'. t('all day') .'</div>'."\n";
      break;
  }
  $output .= '<div class="title">'. l($node->title, "node/$node->nid", array('title' => t('view this item'))) .'</div>'."\n";
//  $output .= $times;
  $output .= $node->teaser;
  $output .= '<div class="links">'. theme('links', $node->calendar_links) ."\n</div>";
  $output .= '</div>' . "\n";

  return $output;
}

Comments

Lowell’s picture

I've simply rewrote this theme and now the stray date is not an issue.

Thanks to karens for creating the theme file, this will make things much easier.

Can I mark this issue as closed or fixed myself?

KarenS’s picture

Status: Active » Fixed

Yes, the idea is that you can control this however you want in the theme, so this is the right fix. That $times value is going to display the time of the event which in some cases may not be what you want (like if you have the time showing in the title), so you can make it work however you need it to.

Anonymous’s picture

Status: Fixed » Closed (fixed)