Download & Extend

Remove space between time and am/pm in week and day view displays

Project:Calendar
Version:7.x-3.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I've got this problem where the time labels in the left column of the calendar in a day or week display get mangled in my theme (a fusion subtheme):

mangled time label

I can get round this somewhat by changing the line-height of the elements in question, but actually, I'd much prefer to change the format of this text like this:

Before 1:00 am to Before 1am or even <1am

So, removing the minutes altogether (they don't need to be there) and removing the space between the hour and the am or pm, which shouldn't be there.

Can this be changed in the module - I can't find where this gets defined. I'd happily make a patch if I could see where this gets defined.

Or can I change it with a theme function?

Comments

#1

I've just spotted why the time and am/pm get space between them:

<span class="calendar-hour">Before 1:00</span>
<span class="calendar-ampm">am</span>

There's a line break between the 2 span tags which browsers treat as a space, regardless of the html specs - see http://www.w3.org/TR/html4/appendix/notes.html#h-B.3.1

#2

A patch to remove the space between the time & apm/pm on week, week-overlap, day and day-overlap views.

AttachmentSize
remove_space_before_ampm-1322376-2.patch 3.31 KB

#3

Title:Change time format in week and day view display» Remove space between time and am/pm in week and day view displays
Category:support request» bug report
Status:active» needs review

#4

I moved my issue with removing minutes from these same displays to #1323280: Remove minutes for day and week calendar views and provided a patch.

#5

Status:needs review» fixed

Looks reasonable. Committed. Thanks!

#6

Status:fixed» closed (fixed)

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