Skip to content

Instantly share code, notes, and snippets.

@jo-snips
Created May 23, 2012 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jo-snips/2777297 to your computer and use it in GitHub Desktop.
Save jo-snips/2777297 to your computer and use it in GitHub Desktop.
The Events Calendar: Fix Month Dropdown
function tribe_month_year_dropdowns( $prefix = ” ) {
global $wp_query;
if ( isset ( $wp_query->query_vars['eventDate'] ) ) {
$date = $wp_query->query_vars['eventDate'];
//$date = $wp_query->query_vars['eventDate'] . "-01";
} else {
$date = date_i18n( TribeDateUtils::DBDATEFORMAT );
}
$monthOptions = TribeEventsViewHelpers::getMonthOptions( $date );
$yearOptions = TribeEventsViewHelpers::getYearOptions( $date );
include(TribeEvents::instance()->pluginPath.'admin-views/datepicker.php');
}
@jo-snips
Copy link
Author

Modify tribe_month_year_dropdowns() in /wp-content/plugins/events/public/template-tags/calendar.php around line 144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment