Page 1 of 1
CG Calendar - remove 24 hour clock, popup [SOLVED]
Posted: Sat Jul 20, 2013 12:12 am
by wmisk
I have the CG Calendar running on a new website and can't find a way to change the display setting away from the 24 hour clock. I can make it into a 12 hour am/pm input within the Admin panel, but when it's displayed on the page it shows up in 24 hour time, so an event that goes from 10am to 1pm shows up as 10:00 to 13:00. Any hints?
Also, my client would like to have each event show in a popup instead of going to a display page. I found an older post that works on older versions of CMSMS/CGCalendar:
http://forum.cmsmadesimple.org/viewtopi ... =7&t=50883
but it doesn't work with this current version-only goes to white page with info on it. Any suggestions or tips on this would be greatly appreciated!
CMSMS version 1.11.7
CG Calendar version 1.10.4
JQueryTools 1.2.5
CG Extensions 1.37
Re: CG Calendar - remove 24 hour clock on display, popup
Posted: Sat Jul 20, 2013 10:54 am
by velden
Regarding popup: do you have a link to the site?
Re: CG Calendar - remove 24 hour clock on display, popup
Posted: Sat Jul 20, 2013 3:58 pm
by wmisk
It's live on
http://www.turcottemusic.com/calendar, click to August for events.
Re: CG Calendar - remove 24 hour clock on display, popup
Posted: Sat Jul 20, 2013 6:22 pm
by velden
Try:
Code: Select all
jQuery('a.calendar_event').fancybox({type:'iframe'})
Works for me on your site.
Re: CG Calendar - remove 24 hour clock on display, popup
Posted: Sat Jul 20, 2013 7:54 pm
by wmisk
I still don't see the popup even with that change, sorry. I'm using Firefox 22 and also checked in IE-both just link to a new page with no formatting.
Re: CG Calendar - remove 24 hour clock on display, popup
Posted: Sat Jul 20, 2013 8:03 pm
by velden
Your javascript is not quite valid now:
Code: Select all
<__script__ type="text/javascript">
jQuery('a.calendar_event').fancybox({type:'iframe'})
});
</__script>
Think this works better:
Code: Select all
<__script__ type="text/javascript">
$(document).ready(function() {
jQuery('a.calendar_event').fancybox({type:'iframe'})
});
</__script>
ps: return link in calendar detail should be removed when things work.
Re: CG Calendar - remove 24 hour clock on display, popup
Posted: Sat Jul 20, 2013 11:23 pm
by wmisk
Yes! Works perfectly now, thanks so much for your help! Anyone have any ideas for the 24 hour clock issue?
Re: CG Calendar - remove 24 hour clock on display, popup
Posted: Sun Jul 21, 2013 8:57 am
by velden
Looking at the templates of CGCalendar it uses time formatting.
Example:
Code: Select all
{$event.event_date_end|date_format:"%H:%M"}
I guess you could change the format by using other values as described here:
http://nl3.php.net/strftime
Example:
Code: Select all
{$event.event_date_end|date_format:"%l:%M %P"}
Re: CG Calendar - remove 24 hour clock on display, popup
Posted: Tue Jul 23, 2013 5:07 am
by wmisk
Thank you, that works perfectly! I appreciate all your help!