Home › Forums › Calendar Products › Events Calendar PRO › Tooltip start time – all displaying same time
- This topic has 6 replies, 3 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
October 12, 2012 at 1:03 pm #26571
Kelly
ParticipantI 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/bL5Tus6rThe mini-calendar is here: http://www.1000islandsplayhouse.com/
And the full calendar is here: http://www.1000islandsplayhouse.com/calendar/Thanks!
October 12, 2012 at 1:30 pm #26574Jonah
ParticipantHi 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
October 12, 2012 at 1:38 pm #26575Kelly
ParticipantHey 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….
October 12, 2012 at 2:06 pm #26577Jonah
ParticipantHi 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
October 12, 2012 at 2:30 pm #26579Kelly
ParticipantPerfect!! Works like a charm. Thanks Jonah.
October 12, 2012 at 3:21 pm #26580Jonah
ParticipantGlad 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,
JonahJuly 7, 2015 at 6:26 am #977981Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘Tooltip start time – all displaying same time’ is closed to new replies.
