Tooltip start time – all displaying same time

Home Forums Calendar Products Events Calendar PRO Tooltip start time – all displaying same time

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #26571
    Kelly
    Participant

    I just noticed there’s a bit of a bug in my mini-calendar widget. I have customized it to display the start time on the tooltip. For some reason, though, they’re all displaying just one time (2:30) regardless of what time the event is actually at. On the main calendar itself, the time is correctly displayed.

    Any ideas what might be going on? Here’s the code I’m using:
    http://pastebin.com/bL5Tus6r

    The mini-calendar is here: http://www.1000islandsplayhouse.com/
    And the full calendar is here: http://www.1000islandsplayhouse.com/calendar/

    Thanks!

    #26574
    Jonah
    Participant

    Hi Kelly,

    You need to pass in the ID of each event for the start date function like so:

    tribe_get_start_date( $post->ID, true, ' ' )

    That should do it. Let me know if you need anything else.

    – Jonah

    #26575
    Kelly
    Participant

    Hey Jonah. Thanks for getting back so quickly.

    Hmm… I’ve made that change, but there are still some events that are showing incorrect times. For example, hover over Wed Oct 17… there is a 2:30 and an 8:00 performance of Tempting Providence… they still both display 2:30.

    Or Fri Oct 26. It should read 7:30 Alexander…. 8:00 Tempting… instead, it reads 7:30 Alexander… 2:30 Tempting….

    #26577
    Jonah
    Participant

    Hi Kelly,

    I see what’s going on. Unfortunately we don’t have support for passing the post ID in tribe_get_start_date() for recurring events. I’ve just created a feature request to get this added but no guarantees when it will be. As an alternative you should be able to pull the start date/time as pure meta and format it accordingly like so:

    $return .= ''. date('g:ia', strtotime(tribe_get_event_meta( $post->ID, '_EventStartDate', true ))) . '';

    If you want to change the date format, add the actual date, etc. just take a look at what you need in the PHP date reference: http://php.net/manual/en/function.date.php and modify the ‘g:ia’ part in the code.

    I hope that helps!

    – Jonah

    #26579
    Kelly
    Participant

    Perfect!! Works like a charm. Thanks Jonah.

    #26580
    Jonah
    Participant

    Glad to hear that worked Kelly. I’m going to close this thread out but feel free to bring up any other questions you have in another thread.

    Thanks,
    Jonah

    #977981
    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 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Tooltip start time – all displaying same time’ is closed to new replies.