Forum
Change default event calendar clock format
Hi!
I'm using the events app, and I would like to know how i could change the time format that the calendar uses to display time. For instance, if I add an event X at the starting time 15h, in the calendar that same event will show up as 3:00 X, and i would like it to show up as 15:00 X.
Here is my code for the main php:
perch_events_calendar();
And here is my code for the calendar template:
<div style="margin: auto; text-align: center; background: rgba(255,255,255,0.7);">
<h2><perch:events id="selected_month" format="%B %Y" /></h2>
<ul class="calendar-nav">
<a href="?d=<perch:events id="current_month" format="Y-m" />"><perch:events id="current_month" format="%b %Y" /></a>
<a class="paging-next" href="?d=<perch:events id="next_month" format="Y-m" />"><perch:events id="next_month" format="%b %Y" /><img src="img/next.png"/> </a>
</ul>
</div>
<table id="calendar" class="calendar table-condensed table-bordered table-striped" style="margin: auto;">
<thead>
<perch:events id="header" encode="false" />
</thead>
<tbody>
<perch:events id="body" encode="false" />
</tbody>
</table>
For future reference,
To accomplish what i wanted i just needed to change the event-day.html template to this:
You can also add your
X
to theformat
attribute.