Start times show in Month View for all-day events (12:00AM)

Home Forums Calendar Products Events Calendar PRO Start times show in Month View for all-day events (12:00AM)

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #236210
    kalalau
    Participant

    Sorry to bother you again. I have one more item to fix in my customization of ECP. I wanted to have the start times show for events in the Month View calendar. At first, I used the code per the tutorial here: https://theeventscalendar.com/support/documentation/add-start-time-to-event-title-in-month-view/

    echo tribe_get_start_date( $post->ID, true, ‘ ‘ ) . ‘ ‘;

    However, that did not work. So I used the code suggested in this forum post: https://tri.be/support/forums/topic/unable-to-add-start-time-to-event-in-month-view/

    tribe_get_start_date( $post->ID, false, get_option( ‘time_format’ ) )

    That worked, but now I get start times for all events, even the all-day events (they show 12:00AM). How do I remove the start times for all-day events?

    Sorry for any formatting issues with this post…wasn’t sure the best way to copy the code.

    #236213
    kalalau
    Participant

    Sorry, mistake in previous post. The code I am actually using is:

    tribe_get_start_date( $post->ID, true, get_option( ‘time_format’ ) )

    #238123
    Barry
    Member

    Hi!

    Yeah the forum isn’t a great venue for sharing code and typically it’s best (at least at this time) to share by linking to the code on Pastebin, Gist or some similar service.

    To the issue at hand, have you tried using the tribe_event_is_all_day() function?

    if ( ! tribe_event_is_all_day() ) echo tribe_get_start_date( /* your params */ );

    Does that help at all?

    #239297
    kalalau
    Participant

    Yes, that worked. 🙂

    Once again, your support is terrific and your product is awesome! Thank you for all your help.

    #244594
    Barry
    Member

    Delighted to be able to help 🙂

    I’ll go ahead and close this thread – but if we can help with anything else please do create new threads as needed. Last but not least, we’re always keen to hear what customers like you think of our product and if you wished to leave a review that would definitely be appreciated.

    Thanks again!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Start times show in Month View for all-day events (12:00AM)’ is closed to new replies.