Home › Forums › Calendar Products › Events Calendar PRO › Date selector on grid calendar view is off by a month
- This topic has 14 replies, 9 voices, and was last updated 8 years, 9 months ago by Support Droid.
-
AuthorPosts
-
January 19, 2012 at 5:54 pm #13678SteveMember
Hi, great plugin. Finally someone made a real event calendar for WP.
Except for one thing. When you’re looking at the calendar grid view, the name of the month in the dropdown is off by one month. So if I’m looking at my website’s calendar right now (January 2012) it shows December 2011 in the drop-down. Not to worry, here is a fix. Just change this bit of code in /public/template-tags/calendar.php, around line 144:
function tribe_month_year_dropdowns( $prefix = ” ) {
global $wp_query;if ( isset ( $wp_query->query_vars[‘eventDate’] ) ) {
// change this line: $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’);
}January 20, 2012 at 8:01 pm #13732RobMemberThis suggestion here is awesome, Steve – thank you. We’ve had a few users report this issue so far, and though I’ve been unable to recreate it on my end, your fix will definitely be of value to others who come with the same problem down the road. Thanks again.
January 23, 2012 at 1:17 pm #13895EmmettMemberSteve, I just found this solution – thank you for taking the time to share your fix. Unfortunately, I can’t find the /public/template-tags/calendar.php you are referring to. Can you give me bit more direction? It this in the Events Calendar Pro plug-in folder? Thanks again!
January 24, 2012 at 11:02 am #13968RobMemberHey Emmett. That file would actually be in the folder for the free The Events Calendar; since PRO is an add-on that extends the functionality of free, a lot of the core stuff is in that free Events Calendar folder. Hope this helps – let me know if you’ve still got questions on it.
January 26, 2012 at 2:20 pm #14217Dave MeyerParticipantThat fixed it for me. Steve and Rob, I really appreciate your help.
January 26, 2012 at 5:00 pm #14228RobMemberHappy to help (for what little I did). Steve’s the man.
Dave, let us know if you need anything else in the future!
February 7, 2012 at 5:51 pm #14833DavidParticipantThis didn’t seem to fix it for me. I see what you did and that should have been the fix, but it’s not working for me. Also my tribe_get_current_month_text(); is a month behind.
Any ideas?
February 7, 2012 at 5:53 pm #14834DavidParticipantWait, seems to work now…Odd.
February 7, 2012 at 6:56 pm #14840RobMemberGreat to hear that did it, David – if for some reason the problem arises again let me know and we’ll try and assist as best we can.
April 24, 2012 at 7:55 am #18233CarlosParticipantgood fix Steve! thxs!
April 26, 2012 at 3:14 pm #18332RobMemberHeck yeah. Thanks for confirming that did the trick, Carlos.
May 1, 2012 at 8:36 pm #18534SpoaMemberI found this post because I am having this problem as well and it appears that the change suggested here is already in place. Any other ideas as to what could cause this issue? I’m running v2.0.6 on WP 3.2.1.
May 2, 2012 at 7:20 pm #18590SpoaMemberNevermind…it turns out I misinterpreted the comment. It’s working correctly now.
May 3, 2012 at 10:44 am #18617JonahParticipantGlad to hear Spoa, let us know if there’s anything else we can help out with here.
July 7, 2015 at 6:19 am #976711Support DroidKeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Date selector on grid calendar view is off by a month’ is closed to new replies.