Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Event Calendar -> UpcomingEvents date format


Reply

4 Posts   1070 Views

Avatar
Avatar8

21 September 2010 at 12:33pm Community Member, 8 Posts

Hi. I'm having and issue trying to change the date format that the UpcomingEvents function displays from YYYY-MM-DD to MM-DD-YYYY. I've made the En-US localization changes in both the master and Event Calendar _config.php files. Dates and times now display properly throughout the site except for the UpcomingEvents function. Is there something I'm missing?

Thanks.

Avatar
UncleCheese

21 September 2010 at 1:29pm 4085 Posts

You're using the $_Dates function?

When you say you made localization updates, what do you mean by that?

---------------
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com

Avatar
Avatar8

21 September 2010 at 3:13pm Community Member, 8 Posts

By localization I meant changing the date and time display to US format, using the functionality provided in the _config.php file in Event Calendar.

Here's an example of the code I'm using for UpcomingEvents:

<% control UpcomingEvents(5) %>
<li><a href="$Link">$EventTitle<small>$StartDate</small></a></li>
<% end_control %>

Not sure if $StartDate is related to $_Dates... Pretty new to all this:) Thanks for the help.

Avatar
Avatar8

24 September 2010 at 4:16am Community Member, 8 Posts

Solved. The $_Dates function is what I needed.