calendar backend

General project discussion. NOT for help questions.
Post Reply
lleighh
Forum Members
Forum Members
Posts: 59
Joined: Tue Apr 11, 2006 2:40 pm

calendar backend

Post by lleighh »

how can I change the way the calendar start/end time dropdown works.  it gives 24 hour (military/international) time by default.  my clients are civilian americans ... they want am/pm 12 hr style.  (see screenshot below)

Image
westis

Re: calendar backend

Post by westis »

well, that requires changing some hard-coding in the module file, I'm afraid... I'd been thinking of trying to add the Xin Calendar instead of the dropdowns, which also is possible to customize to what you call military and civilian time (although afaik the entire non-English speaking world is using the 24 hour system... ;) ).

But apparently the Calendar module is in need of a rewrite anyway, which unfortunately is more than I can handle on my own. If anyone's interested in doing this, I'd be willing to help out. It seems like the original developer is no longer developing Calendar.
lleighh
Forum Members
Forum Members
Posts: 59
Joined: Tue Apr 11, 2006 2:40 pm

Re: calendar backend

Post by lleighh »

thanks, westis.  i figured it had to do with some core files but i didn't know if maybe i had overlooked some patch or upgrade or somthing. 

when my client brought it up (the fact that the time is 'funny') i had to admit i hadn't noticed bec. i was trained as an engineer and after more than a decade of looking at military time/metric system/etc. i knew how to read it and it didn't register to me that others might have a problem with it.

for those time-challenged civilian american clients (most of which i have, apparently/unfortunatly) is there a quick way to code in a little statement something to the effect ... 'the time displayed is based on a 24-hour system. to convert it to a 12 hour system ... blah blah'?
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: calendar backend

Post by Elijah Lofgren »

lleighh wrote: how can I change the way the calendar start/end time dropdown works.  it gives 24 hour (military/international) time by default.  my clients are civilian americans ... they want am/pm 12 hr style.  (see screenshot below)

Image
Since this seemed to be an easy feature, I decided to add it to Calendar.  ;)
Added to calendar in latest SVN: http://viewsvn.cmsmadesimple.org/viewsv ... r&view=rev

You can just download these 2 files:
http://viewsvn.cmsmadesimple.org/viewsv ... iew=markup
http://viewsvn.cmsmadesimple.org/viewsv ... iew=markup
and replace your current ones with those.

Then just go to the "Settings" tab and check the 'Use twelve hour clock on hour drop-downs?' checkbox and hit submit.

Then when you edit or add an event you will get 12 hour style dropdowns for the hours.

Enjoy  ;)

Screenshot attached:

[attachment deleted by admin]
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
lleighh
Forum Members
Forum Members
Posts: 59
Joined: Tue Apr 11, 2006 2:40 pm

Re: calendar backend

Post by lleighh »

this is great.  works like a charm.  i'm loving you man, Elijah. Thanks so much.
carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm

Re: calendar backend

Post by carasmo »

I installed both files, but when I install the "Calendar.module.php" replacement, the calendar page goes away and the calendar menu item under the "content" menu in the admin disappears.

What am I doing wrong?

Thanks!
reidjazz

Re: calendar backend

Post by reidjazz »

Did you install via FTP (and if so, were you logged out of CMS MS when doing so?) or via the admin panel?

If via FTP and logged in, this might be part of the problem. Try logging out and uploading via FTP again.

Reidjazz
carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm

Re: calendar backend

Post by carasmo »

Thanks. I got it worked out. The calendar had all the stuff already part of the install since it was recent. The problem was with the front end templates. I changed %H to %I and it works fine now.

THanks!
reidjazz

Re: calendar backend

Post by reidjazz »

Glad to help out.

reidjazz
User avatar
chuckienorton
Forum Members
Forum Members
Posts: 68
Joined: Wed Feb 14, 2007 6:58 pm

Re: calendar backend

Post by chuckienorton »

Is there an easy way to change the frontend time to non-military time?
Post Reply

Return to “General Discussion”