• Resolved tim.palander

    (@timpalander)


    You’ve forgot to check if the end date is the same as the start date in views/list.php.

    I’ve added this for myself at line 39 to resolve it, followed by an <?php endif; ?> on line 44: <?php if(the_event_start_date() !== the_event_end_date()): ?>

Viewing 1 replies (of 1 total)
  • This is a nice fix for when we set the start date but forget to set the end date – putting the end before start of the event. In case of all-day events, the end date is simply reset to the start date. For one-day timed events, the fix will simply set the end to start date keeping the set times. For timed events spread over days, the fix will just show the start day/time of the event.

    The code when inserted into list.php looks like this:

    <table>
    		                  <tr>
    		                    <td class="tec-event-meta-desc"><?php _e('Start:', $spEvents->pluginDomain) ?></td>
    		                    <td class="tec-event-meta-value"><?php echo the_event_start_date(); ?></td>
    		                  </tr>
    <?php if(the_event_start_date() !== the_event_end_date()): ?> // added to reset erroneous end date if earlier than start
    		                  <tr>
    		                    <td class="tec-event-meta-desc"><?php _e('End:', $spEvents->pluginDomain) ?></td>
    		                    <td class="tec-event-meta-value"><?php echo the_event_end_date(); ?></td>
    		                  </tr>
    		                  <?php
    <?php endif; ?>
    		                    $venue = the_event_venue();
    		                    if ( !empty( $venue ) ) :
    		                  ?>

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: The Events Calendar] End date in list.php’ is closed to new replies.