Separate Time and Date

Home Forums Calendar Products Events Calendar PRO Separate Time and Date

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #22786
    raindance
    Participant

    I want to separate the time and date so that they display as two separate fields on the event page. So ideally:
    Starts: July 26, 2012
    From: 6:30pm to 9pm
    Is there any straightforward way of doing this I’m missing? If not, what files will I need to modify to do this?
    Any help much appreciated.

    #22836
    Rob
    Member

    Hey Christian. This is an interesting request; while it isn’t something I’m positive on how to do, I think there is a way to make it work. Let me get our developer Paul – more well-versed in such issues than myself – to take a look and try and point you in the right direction.

    Stay tuned and thanks for your patience so far.

    #23020
    moderntribe
    Participant

    Hi, Christian!

    Unfortunately, you would be able to format the date as you’d like using tribe_get_start_date(), except for the fact that we currently don’t have a filter at that part of the events page. Is that something you would be interested in having for future releases? It wouldn’t be too hard for us to add such a filter, if it’s something you think you’d use. Let us know! Thanks for using The Events Calendar

    #23021
    moderntribe
    Participant

    I forgot one exception; if you overwrite the single.php for events (by placing a single.php in an events subdirectory of your theme directory) you would be able to design the single event page however you liked, and could use tribe_get_start_date() in order to format the dates however you saw fit. Let me know if that doesn’t make sense (and see https://theeventscalendar.com/support/documentation/events-calendar-themers-guide/ for a more in-depth guide to the overrides).

    #23040
    raindance
    Participant

    Many thanks. I’ve already made several changes to the single.php file. What do I need to put to format the time differently?
    Something to do with this?
    I think it would definitely be worth adding to future releases. Just looks a bit nicer in my opinion.

    #23041
    raindance
    Participant

    Can’t paste code apparently… This is what I tried to paste: tribe_get_start_date( null, false, ‘Y-m-d-h:i:s’

    #23088
    Rob
    Member

    Hey Christian. Thanks for the heads up; not sure if Paul saw your response, but I’ve asked him to take another look. Stay tuned on that end.

    Regarding code: unfortunately we don’t have a good method for this yet, but are working on it. In the interim feel free to use pastie.org or a similar service.

    #23903
    Jonah
    Participant

    Hi Christian,

    Make a copy of /wp-content/plugins/the-events-calendar/views/single.php and place in an ‘events’ folder in your theme. Then find lines 21-29 (the block of code dealing with the date/time and modify to something like this: https://gist.github.com/3421708

    I hope that helps but let me know if you need anything else.

    Regards,
    Jonah

    #24284
    Rob
    Member

    Hey Christian: just wanted to post here to check if you needed anything else, or if Jonah’s solution above did the trick. Can you confirm so we can close out the thread or follow-up as needed? Thanks!

    #24647
    Rob
    Member

    Closing this thread out due to inactivity. Christian, per my note above, please let us know in a new thread if this issue persists. Thanks!

    #977693
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Separate Time and Date’ is closed to new replies.