tribe_mini_calendar & set the month="2017-01"

Home Forums Calendar Products Events Calendar PRO tribe_mini_calendar & set the month="2017-01"

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1190797
    Daan
    Participant

    Dear support team,

    I’ve been looking for a way to set the month for a mini calendar this whole morning.
    e.g. like this: [tribe_mini_calendar category=”my_cat” month=”2017-01″]

    Only now do i see i have to get the ‘shortcode *pro*’.
    I’m hoping that putting this here will prevent somebody else from looking for it for too long.

    I’m feeling slightly disappointed, but at least hopeful that the functionality is there.
    Would you be so kind as to confirm this?
    That is: with the ‘shortcode pro’ can i make a mini calendar of a certain month in the future or the past?

    Much obliged,
    Daan

    #1191200
    Nico
    Member

    Hi Daan,

    Thanks for reaching out to us! I can help you here 🙂

    Let me start by saying there’s actually no setting for this, but maybe I can craft a JavaScript snippet to change the month once the mini calendar is loaded in the page.

    Just to be sure, you want the mini calendar widget to show January 2017 instead of the current month right?

    One last thing I’m not sure about the ‘shortcode pro’ purchase you mention. It doesn’t sound like nay of our products. Can you clarify a bit on this (maybe send a link to where you saw this)?

    Best,
    Nico

    #1191742
    Daan
    Participant

    Hi Nico,
    Thanks for helping out!

    Ah, now i see what tricked me. The fact that they call themselves ‘the events calendar newsletter‘ got me mixed up. (see image)

    The Events Calendar Shortcode & Block


    The green upgrade link on the plugin’s page going here: https://eventcalendarnewsletter.com/the-events-calendar-shortcode/

    But now I see that this plugin doesn’t have the mini calendar of a specific month either. That setting is just for the list.

    I’m making a monthly calendar for 2017, so I’ll have a page for each month. Having a way to show each months program would be great.
    Of course I prefer to have search engines to actually see the relevant links of each month. I don’t think that will happen with a js snippet. Would it be possible to make it a feature and serve a certain month straight up? Pretty-please?

    Regards,
    Daan

    #1192414
    Nico
    Member

    Thanks for following up Daan!

    I could find a work around for this, let me say it’s unsupported and while it seems to work on the basic samples it might not be perfect! Basically it’s just a wrapper for the shortcode that set’s the ‘eventDate’ variable. Paste this code in your theme’s (or child theme’s) functions.php file:


    // [tribe_mini_calendar_date eventDate="2017-12-1"]
    function tribe_mini_calendar_date_func( $args ) {

    // add event date
    if ( isset( $args['eventdate'] ) ) {
    define ( 'DOING_AJAX', true);
    $_POST['eventDate'] = $args['eventdate'];
    }

    ob_start();
    the_widget( 'Tribe__Events__Pro__Mini_Calendar_Widget', $args, $args );
    return ob_get_clean();
    }
    add_shortcode( 'tribe_mini_calendar_date', 'tribe_mini_calendar_date_func' );

    Give a try by using it this way [tribe_mini_calendar_date eventDate="2017-12-1"].

    Hope this helps,
    Best,
    Nico

    #1193070
    Daan
    Participant

    Hi Nico,
    That works great! Thanks.

    I tried it out and found that:
    – all the mini calendars on a page after one with a date set go to the prescribed month.
    – categories setting don’t work yet.
    – but setting a calendar with the date first and second a calendar with a category works out.
    – list beneath the mini calendar does show activities that start after said month.

    I hope to see more customization options in the future! The start is here!

    Thanks again.
    Daan

    #1193369
    Nico
    Member

    Stocked to hear Daan!

    – all the mini calendars on a page after one with a date set go to the prescribed month.
    – categories setting don’t work yet.
    – but setting a calendar with the date first and second a calendar with a category works out.
    – list beneath the mini calendar does show activities that start after said month.

    Yeah, this are legit caveats or using the customization. As mentioned above it’s just a starting point, and will require com more work to equal the functionality of the ‘official’ shortcode.

    I hope to see more customization options in the future! The start is here!

    For sure maybe the date parameter can be added to the widget parameters. I’ll make sure to share this idea with the team!

    I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.

    Best,
    Nico

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘tribe_mini_calendar & set the month="2017-01"’ is closed to new replies.