yunnnn
Forum Replies Created
-
Forum: Plugins
In reply to: [The Events Calendar] Issues with Version 3.1 HotfixesHi all,
With regards to fix no 2, there are some issues with the original fix and I’ve placed a new one instead.
2. Month View does not display Prev/Next month correctly on last day of month
Replace the entire nextMonth and previousMonth function in /the-events-calendar/lib/the-events-calendar.class.php
/** * Given a date (YYYY-MM-DD), returns the first of the next month * hat tip to Dan Bernadict for method cleanup * * @param date * @return date */ public function nextMonth( $date ) { list($year, $month) = explode("-", $date); $date = $year . "-" . $month . "-01"; return date( 'Y-m', strtotime( $date . ' +1 month' ) ); } /** * Given a date (YYYY-MM-DD), return the first of the previous month * hat tip to Dan Bernadict for method cleanup * * @param date * @return date */ public function previousMonth( $date ) { list($year, $month) = explode("-", $date); $date = $year . "-" . $month . "-01"; return date( 'Y-m', strtotime( $date . ' -1 month' ) ); }
Can’t seem to edit the original post anymore, so here’s a new post instead.
Also, I’ve noticed that the order in list view is messed up after you click on “Previous Events” then “Next Events”…I’ll be looking into this and placing a fix here soon.
Cheers.
Forum: Plugins
In reply to: [The Events Calendar] Issues with Version 3.1 Hotfixes@justin, try this. I haven’t tested it so I’m not sure if it’ll work or not, but I think this is probably the cause.
Go to /the-events-calendar/lib/tribe-event-query.class.php
Find
( $record_start >= $start_of_day && $record_start < $end_of_day )
Replace with
( $record_start >= $start_of_day && $record_start <= $end_of_day )
If that doesn’t work, I’ll have to look into it some other time when I’m free (since it doesn’t affect me yet).