Week and Day views are displayed by hour, and each hour is displayed in "military time." This is unusable for a marketing/communications calendar in the USA. So I'm looking for the setting or view element that allows me to change this, but such a configuration does not appear to be available. Please fix this or suggest a work-around. Any help would be greatly appreciated, and I thank you from the bottom of my heart for any assistance.

Members fund testing for the Drupal project. Drupal Association Learn more


frederico’s picture

Try the following: > Admin > config > regional > date-time. This should help you. -Frederico Garza

MrSasquatch’s picture

@frederico, Your comment doesn't seem to have anything to do with my problem. Can you please be more specific? Thanks much.

nateman332’s picture

go to: > Admin > config > regional > date-time > formats > add, then add your format, it should look something like this: F j, g:i A Y, this will output "April 3, 1:01 PM (or pm, I can't remember) 2013".
Then in admin > config > regional > date-time, you can select your new format as a date type (using the one that your calendar is using, for example "long"). and ta-da! no more army time!!!

nateman332’s picture

Category: bug » support
MrSasquatch’s picture

@nateman332 that did not work. May I ask... Did this work for you, or was it just a theory. Because your advice doesn't seem to have anything to do with Calendar. I am not aware of Calendar using a specific date type that can be configure in the admin the way you described. I tried several, and changing them did not seem to make a difference in any way whatsoever.

The week and day views for Calendar are still stuck in "military time." Can anyone help me with this?

Thanks in advance for anyone's assistance—greatly appreciated!

nateman332’s picture

My advice had everything to do with calendar and it's what worked for me.

You will need to edit the time/date field in your view and change your format.

At the moment I don't have the time to go into any more detail.

nateman332’s picture

Priority: Major » Normal
mcubed4130’s picture

Is anyone willing to post a solution to this issue? It's quite annoying.

And to be clear - I'm not speaking of the times in the calendar entries.

I'm talking about the hours listed down the left hand side - that start at "01" and continue to "23"; when you are in the "week" or "day" view of the calendar.

All previous posts on solving the issue, at least to me have appeared to concentrate on how to display times within a specific calendar entry; not the calendar layout itself.


MrSasquatch’s picture

@mcubed4138, Thank you so much for finally articulating what I could not. You are so right. The previous attempts at a solution were clearly talking about the time in the event node itself, which is completely irrelevant. Yes, we are talking about the military time labels down the left side of week and day view. Can someone please help us with this? This does not appear to be configurable on our end. Please help! Thank you in advance for any assistance that anyone can provide.

nateman332’s picture

Finnaly some one posted a screen shot and better explained it, now maybe people can help.

All the advice I can give you atm is to look at the template files for calendar module.

MrSasquatch’s picture

Everyone, please make sure you share your solution if you find one. Myself, I cannot edit template files. I have too many installations with too many modules, all needing constant updating. To minimize overhead, I do not customize template files. So any help with this is greatly appreciated. I will sweeten the pot a bit with a $25 (US) bounty via paypal. Solve this problem to my satisfaction, and you'll enjoy a sweet $25 payday that you can spend on an overpriced burger at a swanky pub, or a sack of rice, or whatever you need. -John

frederico’s picture

3.8 KB
5.17 KB

I was able to accomplish this using the following procedure (found in the header in http://yoursite.com/admin/config/date/date_popup):

A. Convert Time Format:

1. Go to yoursite.com/admin/config/regional/date-time

2. Select the U.S. civilian (am/pm) time formats for each combobox.

3. Click the Save Configuration button.

B. Install Dropdown TimePicker

1. Install the dropdown timepicker, create a sites/all/libraries/wvega-timepicker directory in your site installation. Then visit https://github.com/wvega/timepicker/archives/master, download the latest copy and unzip it. You will see files with names like jquery.timepicker-1.1.2.js and jquery.timepicker-1.1.2.css. Rename them to jquery.timepicker.js and jquery.timepicker.css and copy them into sites/all/libraries/wvega-timepicker.

2. Go to http://yoursite.com/admin/config/date/date_popup

3. Click on the Timepicker combobox. A new option appears.

4. Choose "Use default jQuery timepicker".

5. Click the Save Configuration button.

The calendar day view should now show the time in the AM/PM format (see image-1_0.png).
It also now allows people to type in the Time field in the AM/PM format (see image-2_0.png).

I hope this helps. -Frederico Garza

burgesscdb’s picture

I was having an issue with the Event Calendar defaulting to military time. I set the regional settings to civilian time and the calendar still reflected military time. After a lot of searching, I found the following setting that fixed my problem in Drupal 7:

Structure > Content Types > Event Calendar > Manage Fields > Date (Edit) > More settings and values > Date entry options dropdown box. I then set the value to civilian time.

I understand this isn't exactly the same issue, but it may help someone.

Good luck!

MrSasquatch’s picture

#13 doesn't seem to be relevant. I already had a date entry option that was a "civilian time" sort of option, so there's nothing I can choose that would affect the outcome and fix this issue.

#12 I have not tried. I'm concerned why it is necessary to install a "timepicker" when that is not the problem. I only want to change the way the time is displayed by the Calendar module. These seems like it should be an issue with Calendar module, not a completely different module that I do not need.


byrond’s picture

#3 seems to be close to the solution. The row labels for the Week and Day displays use the "Short" Date Type. I wanted to make the same change, so I went to admin/config/regional/date-time and changed the Short date type to a format that included the 12-hour time. When I did that, the labels changed on my calendar view.

stedmanj’s picture

Issue summary: View changes

+1 for #15. This worked for me!

jive01’s picture

This isn't working for me. Can someone post step by step directions?

jive01’s picture

Actually rereading, #15 worked like a Charm. Calendars are using the short date format. Thanks @sedmanj

MrSasquatch’s picture

#15 worked for me, too. Thank you, @byrond !!!

steveco2310’s picture

I messed with the suggestions and had no luck until i changed the format in config>date and time> and made sure each type (long, med, short) all used a "am" in the format and had success

kenorb’s picture

Same here, all Long/Medium/Short are AM/PM (with the latest dev), but calendar-week.tpl.php doesn't shows in AM/PM format.

In my case the problem was, that I was overriding preprocess functions in hook_theme_registry_alter(), by using Booking Time Slots (now fixed).

So it's not a Calendar bug, unless somebody has some specific steps to reproduce the issue.

Just double check what do you have in date_format_short variable (it should have a/A).

Calendar checks that format in theme_calendar_time_row_heading() (theme/theme.inc).

So make sure that you've the right format at /admin/config/regional/date-time (AM/PM) and clear you caches.

kenorb’s picture

Status: Active » Closed (works as designed)
butterwise’s picture

#20 worked for me

Stephen Ollman’s picture

In Drupal 8 change the Default Short Date Format to: d/m/Y - g:ia