Widget Date Format

Home Forums Calendar Products Events Calendar PRO Widget Date Format

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #29177
    Grec
    Member

    I followed the advice in the following forum thread and it worked in terms of allowing me to remove the time from the event listing.

    Widget – Separate Date and Time

    In my widget though it only lists shortened months out now. So instead of showing “January” it just shows “Jan”. I experimented with several other PHP date formats but couldn’t get things to work as I’m not really a programmer.

    #29209
    Jonah
    Participant

    Hi Salvador,

    Which widget are you wanting to change this on and do you have a link I can take a look at an example at?

    Thanks,
    Jonah

    #29567
    Grec
    Member

    Sorry internal website… In the Events List Advanced Widget the date simply reads as “Dec 15, 2012” instead of with the month spelled out (e.g., December 15, 2012). As noted above I followed the directions at https://theeventscalendar.com/support/forums/topic/widget-separate-date-and-time/, where you suggested swapping:

    echo tribe_get_start_date( $post->ID, $start );

    with

    echo tribe_get_start_date( $post->ID, false, ‘M’ );
    echo tribe_get_start_date( $post->ID, false, ‘d’ );
    echo tribe_get_start_date( $post->ID, false, ‘Y’ );
    echo tribe_get_start_date( $post->ID, false, ‘g:ia’ );

    Since I didn’t want the “time” I just left out the last line. Of course the “M” format you suggested in the first line above displays the shortened month instead of the spelled out version (e.g., Dec instead of December). I am looking to have the spelled out version.

    Thanks for you assistance…

    #29577
    Grec
    Member

    Also any thoughts on creating an override file for this so I don’t have to redo the changes after each upgrade?

    #29578
    Grec
    Member

    Figure my previous question out in this great. Just make a copy of /wp-content/plugins/events-calendar-pro/views/events-advanced-list-load-widget-display.php and place it into an ‘events’ folder in your active theme.

    Still need to get the month format issue correct though.

    #29653
    Barry
    Member

    Hi Salvador: is the remaining problem simply getting the full month name? If so, simply replace ‘M’ with ‘F’ – it’s the same format as used by PHP to describe date formats.

    #29941
    Grec
    Member

    Thanks Barry! Worked like a charm.

    #29947
    Leah
    Member

    Glad to hear it Salvador! If you don’t have any further questions here, I’ll close out the thread. Feel free to start another one if you need to 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Widget Date Format’ is closed to new replies.