I am using CGCalendar for the first time, and the event template currently displays the time as
06:30:00 PM
But I would like to configure it to show as:
6:30 PM
Does anyone know where I could find or what the code would be, to change that format?
Thanks,
Jesse
cms_date_format: how to change default time format in CGcalendar Template
-
milehigh
Re: cms_date_format: how to change default time format in CGcalendar Template
Here's an example of the syntax needed:
{$event.event_date_start|cms_date_format:"%I:%M %p"}
Additional smarty date formatting details here..
http://www.smarty.net/manual/en/languag ... format.php
{$event.event_date_start|cms_date_format:"%I:%M %p"}
Additional smarty date formatting details here..
http://www.smarty.net/manual/en/languag ... format.php
- wakewatcher
- Forum Members

- Posts: 149
- Joined: Fri Dec 28, 2007 12:33 am
Re: cms_date_format: how to change default time format in
Where is the template for this change? I found the 'sample' template which looks only to populate the table with links to (I guess) hidden pages. I've been searching around but I guess I don't know what I'm looking for. thx.
Re: cms_date_format: how to change default time format in
Most modules that have templates will have tabs for Summary, Detail, etc., templates and and one for all the default templates, they will sometimes be called Sample but they will be the templates used for the front end display of data, look in News for examples...
- wakewatcher
- Forum Members

- Posts: 149
- Joined: Fri Dec 28, 2007 12:33 am
Re: cms_date_format: how to change default time format in
yeah I found those but couldn't see where the suggested change would be made. The main display template just seems to iterate through the calendar and makes hyperlinks to the detail pages but I haven't run across the the templates for the detail pages which displays the time.
Re: cms_date_format: how to change default time format in
Go to Calguys Calendar -> Templates -> Event Templates tab. I just edit the one called Sample (you can always go back to the default template - they are available in the Default Templates tab). If it's a straightforward site you're unlikely to need more than one event template.
To make sure you've got the right template (it's not always obvious), put some temporary text in the template like "BOO!" and refresh the live site.....if you see your text you're editing the right thing.
To make sure you've got the right template (it's not always obvious), put some temporary text in the template like "BOO!" and refresh the live site.....if you see your text you're editing the right thing.
- wakewatcher
- Forum Members

- Posts: 149
- Joined: Fri Dec 28, 2007 12:33 am
Re: cms_date_format: how to change default time format in
Thanks! That did it.


