Jump to:

10979 Posts in 2722 Topics by 1815 members

All other Modules

SilverStripe Forums » All other Modules » Event Calendar -> UpcomingEvents date format

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1053 Views
  • Avatar8
    Avatar
    Community Member
    8 Posts

    Event Calendar -> UpcomingEvents date format Link to this post

    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.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar -> UpcomingEvents date format Link to this post

    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

  • Avatar8
    Avatar
    Community Member
    8 Posts

    Re: Event Calendar -> UpcomingEvents date format Link to this post

    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.

  • Avatar8
    Avatar
    Community Member
    8 Posts

    Re: Event Calendar -> UpcomingEvents date format Link to this post

    Solved. The $_Dates function is what I needed.

    1053 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.