Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Calendar: Start Display for a month in the future | Event Espresso - Staging Server

Support

Home Forums Calendar Calendar: Start Display for a month in the future

Calendar: Start Display for a month in the future

Posted: December 19, 2013 at 10:18 am

Viewing 6 reply threads


Mike Tidmore

December 19, 2013 at 10:18 am

I need to embed the calendar on a specific page of the site but have the first month that shows to be March of 2014. How would I do that? Can I add some parameter to the shortcode?

Thanks!

  • This topic was modified 11 years, 1 month ago by Dean. Reason: moved to calendar forum


Josh

December 19, 2013 at 12:02 pm

Hi Mike,

While there is not a shortcode parameter that does this, you can add one line of code to change the first month that gets displayed. This is for the current version of the calendar plugin: v.2.1:

You add the following to the end of espresso_calendar.js, just before the last line that reads });

$('#espresso_calendar').fullCalendar( 'gotoDate', 2014, 2);

Note that January = 0, so March is 2.

The function reference:

http://arshaw.com/fullcalendar/docs/current_date/gotoDate/


Mike Tidmore

December 19, 2013 at 1:09 pm

Thanks for the speedy reply!… I haven’t actually tried this yet
But….

That sounds like it would work fine for my page March.html where I want it to start with the March view; but What about my APRIL.html page where I want to start the calendar view on that page with April being first in view?

Won’t that line of code make every iteration of the calendar start in March throughout the rest of my site? -Not what I’m trying to accomplish-

Sorry to be a pain!

Thanks again,
-Mike


Dean

  • Support Staff

December 20, 2013 at 1:35 am

Hi Mike,

That’s correct, modifying the code in that way will make every instance of the calendar go to that page.

However, looking at this it is quite simple to add in a shortcode parameter to change the behaviour.

https://gist.github.com/Apina/8051946 Does that. it requires a line change in the espresso-calendar.php (it provides the full file) and also a line added to the espresso_calendar.js, hopefully the instructions are clear.

I will make a request (though I cannot guarantee it will be accepted) for this or something similar to be added to the core calendar.


Mike Tidmore

December 20, 2013 at 10:09 am

Thanks for the Dean. Looks like that should do it. I’ll jump in. I’m pretty code shy; do you think the best way to approach this is to just replace the entire contents of my espresso-calendar.php file with the contents of the post you sent me to? Or just pull out the line I need from it?

Also, i guess this means future updates to the plugin will probably break this customization, correct? That is, until you guys build it in anyway, huh?

By the way, thanks for the new updates to the calendar from a couple of days ago. You guys really improved the look and feel of it!

Thanks again,
Mike


Dean

  • Support Staff

December 22, 2013 at 11:55 pm

Hi Mike,

If you are using version 2.1 of the calendar you can just copy all the code and replace it in the espresso-calendar.php file.

The JavaScript will need to be added to the other file as well, the same place Josh told you to place it, but this line si a little different to the one Josh suggested.

$('#espresso_calendar').fullCalendar( 'gotoDate', eeCAL.custom_year, eeCAL.custom_month);

It looks like my suggestion is being considered for future calendar updates, but yeah if you update the calendar and the feature hasn’t been added you will lose the changes made.

Thanks for the feedback over the calendar, and I’m really happy you like it, we have tried to make it cleaner and faster


Mike Tidmore

December 24, 2013 at 6:13 am

Thanks again Dean. Got it.

Viewing 6 reply threads

The support post ‘Calendar: Start Display for a month in the future’ 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.

Event Espresso - Staging Server