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
CG Calendar - remove 24 hour clock, popup [SOLVED]
CG Calendar - remove 24 hour clock, popup [SOLVED]
Last edited by wmisk on Tue Jul 23, 2013 5:08 am, edited 1 time in total.
Re: CG Calendar - remove 24 hour clock on display, popup
Regarding popup: do you have a link to the site?
Re: CG Calendar - remove 24 hour clock on display, popup
It's live on http://www.turcottemusic.com/calendar, click to August for events.
Re: CG Calendar - remove 24 hour clock on display, popup
Try:
Works for me on your site.
Code: Select all
jQuery('a.calendar_event').fancybox({type:'iframe'})
Re: CG Calendar - remove 24 hour clock on display, popup
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
Your javascript is not quite valid now:
Think this works better:
ps: return link in calendar detail should be removed when things work.
Code: Select all
<__script__ type="text/javascript">
jQuery('a.calendar_event').fancybox({type:'iframe'})
});
</__script>
Code: Select all
<__script__ type="text/javascript">
$(document).ready(function() {
jQuery('a.calendar_event').fancybox({type:'iframe'})
});
</__script>
Re: CG Calendar - remove 24 hour clock on display, popup
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
Looking at the templates of CGCalendar it uses time formatting.
Example:
I guess you could change the format by using other values as described here: http://nl3.php.net/strftime
Example:
Example:
Code: Select all
{$event.event_date_end|date_format:"%H:%M"}
Example:
Code: Select all
{$event.event_date_end|date_format:"%l:%M %P"}
Re: CG Calendar - remove 24 hour clock on display, popup
Thank you, that works perfectly! I appreciate all your help!