I'd like to be able to display the mini-calendar block with just the first letter of the day names, ie. S,M,T, W, T, F, S but still have the full day names (Sunday, Monday, etc.) display on the large monthly and weekly calendars. Is there an easy way to tweak the module to make this happen?

Thanks

Comments

andygoneawol’s picture

Put the following in template.php in your theme directory. You need to change "yourtheme" to the name of your theme. (This will work on Drupal 6. I don't know about 5.)

function yourtheme_event_calendar_month($op, $header, $rows, $attributes = array(), $caption = NULL) {
  switch ($op) {
  case 'block':
    $header[0]['data'] = t('M');
    $header[1]['data'] = t('T');
    $header[2]['data'] = t('W');
    $header[3]['data'] = t('T');
    $header[4]['data'] = t('F');
    $header[5]['data'] = t('S');
    $header[6]['data'] = t('S');
    break;
  }

  return theme("table", $header, $rows, $attributes, $caption);
}
RWWood’s picture

The substituted function works as far as changing the block headers to MTWTFSS, but it also removes all formatting from the block calendar and causes the supposedly full size calendar to be block size and to lose its css formatting as well. I'll try to sort out why, but my php skills aren't that great.

Thanks.

japerry’s picture

Status: Active » Closed (outdated)

Event for Drupal 8 is unrelated to older versions. If an issue similar to this one exists, please open a new issue with the 8.x branch.