Posted: March 8, 2016 at 1:44 pm
|
I have my table view of events set up to where there is a column for date and time separated. All the dates however become March 8, when you click on the event the real date shows in the event ticket. Why is it doing that? You can see a screen shot of it here: I currently have the website updated with the a different table: <td class=”start_date event-<?php echo $post->ID; ?>” data-value=”<?php echo $datetime->get_raw( ‘DTT_EVT_start’ ); ?>”><?php echo $startdate; ?></td> |
Hello,
We’ll need more information to share feedback. What is the page link from the screenshot so we can see the events list table? — |
|
Hi there, Did you make any changes to the $startdate variable in your custom template? |
|
|
Hi, No, I did not edit the $startdate, both files have the same code below: $startdate = date_i18n( $date_format . ‘ ‘ . $time_format, strtotime( $datetime->start_date_and_time(‘Y-m-d’, ‘H:i:s’) ) ); <td class=”start_date event-<?php echo $post->ID; ?>” data-value=”<?php echo $datetime->get_raw( ‘DTT_EVT_start’ ); ?>”><?php echo $startdate; ?></td> Unfortunately the classes are live now so I am unable to switch the code over. I could for a short period of time if we happen to be on at the same time tomorrow. This would be the entire code for the table that I would like but is not showing the accurate dates: <?php if ( have_posts() ) : <?php if ($category_filter != ‘false’){ ?> foreach($ee_terms as $term){ <?php if ($footable != ‘false’ && $table_search != ‘false’){ ?> <table id=”ee_filter_table” class=”espresso-table footable table” data-page-size=”<?php echo $table_pages; ?>” data-filter=”#filter”> <?php //Debug //Get the category for this event } //Create the register now button if ( $event->is_sold_out() || $event->is_sold_out(TRUE ) ) { $datetimes = EEM_Datetime::instance()->get_datetimes_for_event_ordered_by_start_time( $post->ID, $show_expired, false, 1 ); $datetime = end( $datetimes ); //let’s use date_i18n on the correct offset for the timestamp. Note it seems like we’re doing a lot of $startdate = date_i18n( $date_format); <td class=”start_date event-<?php echo $post->ID; ?>” data-value=”<?php echo $datetime->get_raw( ‘DTT_EVT_start’ ); ?>”><?php echo $startdate; ?></td> <td class=”day_of_week event-<?php echo $post->ID; ?>”><?php espresso_event_date_range( ‘l’, ‘ ‘, ‘l’, ‘ ‘, $event->ID() ); ?></td> <td class=”time event-<?php echo $post->ID; ?>”><?php espresso_event_date_range( ‘g:i a’, ‘ ‘, ‘ ‘, ‘ ‘, $event->ID() ); ?></td> <td class=”venue_title event-<?php echo $post->ID; ?>”><?php espresso_venue_name( NULL, FALSE ); ?></td> <td class=”td-group reg-col” nowrap=”nowrap”><?php echo $live_button; ?></td> endwhile; else : endif; |
Hi there, So in your template where you have this:
That’s broken. You need to change it to something like this:
In the future, please post code blocks that are longer than 10 lines to a pastebin or github gist and link here. |
|
|
Thank you so much for the fast support! In the future I will post a link! |
The support post ‘All the same dates appear in the table view when date/time columns are separated’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.