Jump to:

10979 Posts in 2722 Topics by 1815 members

All other Modules

SilverStripe Forums » All other Modules » Event Calendar - Time format

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1420 Views
  • Clint
    Avatar
    Community Member
    2 Posts

    Event Calendar - Time format Link to this post

    My event times are displaying in 24 hour format. I have tried changing several different javascript and PHP files with settings in them but I have had no luck. Does anyone know where this setting might be? To see my events go to http://canyonspringsward.com/cms/ward-calendar/

  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar - Time format Link to this post

    CalendarDateTime::set_time_format('12');

  • Clint
    Avatar
    Community Member
    2 Posts

    Re: Event Calendar - Time format Link to this post

    Wow, there it was right in the _config file... Sorry for the trouble of even making a response. But thank you for responding so rapidly.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar - Time format Link to this post

    Just make sure you put the code in your /mysite/_config.php rather than altering the event_calendar/_config.php. Just makes it easier to install updates. You won't have to make the same modification every time.

  • Neme
    Avatar
    Community Member
    1 Post

    Re: Event Calendar - Time format Link to this post

    Hi,

    I just found minor bug in format_character_placeholders and format_character_replacements arrays in CalendarUtil.php.

    Took me a while to find where the problem. I was trying to get days without leading zeroes and used in _gonfig.php
    following placeholders: "sDayNumShort" and "eDayNumShort". Outcome was days with leading zeroes.

    Solution was obvious when I looked at those two arrays. In "format_character_replacements"-array replacements for "sDayNumShort" and "sDayNumFull" were swapped (in wrong order) and same goes also with "eDayNumShort" and "eDayNumFull."

    I hope this helps somebody.

    1420 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.