Have 12 months of mini calendars

Home Forums Calendar Products Events Calendar PRO Have 12 months of mini calendars

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #890508
    Jon Nixon
    Participant

    I’m trying to figure out a way to have 12 months of mini calendars display on my calendar page. It seems the only way to display the mini calendar is by adding a widget (which I’ve done). However, I can’t figure out a way to pass a month to tribe_show_month inside mini-calendar-widget.php. Any pointers?

    #891100
    Josh
    Participant

    Hello nixonmedia,

    Thanks for reaching out to us!

    I’m not sure there is an easy way to accomplish what you’re trying to with multiple instances of the events calendar widget. You can set the default month for the widget using the following tutorial. That tutorial shows how to fast forward, however you can pass the month directly to the new instance of the class. So,  adding “new Tribe_Advance_Minical(‘2014-12’);” will force the calendar widget to start in December.

    I’m sorry I wasn’t able to give you a direct response however I hope this was able to point you in the right direction.

    – Josh

    #891899
    Jon Nixon
    Participant

    Thanks for the reply Josh. I’ve seen that post on how to change the date on a single calendar. However, I’m looking to be able to do this to a series of calendars. Before I venture down that path more, do you know if it is possible to have multiple calendars on a single page?

    #892400
    Jon Nixon
    Participant

    Also, I think it’s worth noting that I’m attempting the same method of
    the_widget( ‘TribeEventsMiniCalendarWidget’,$instance, $args );
    referenced here:

    Mini Cal – Month of Next Event – the_widget()


    the_widget( ‘TribeEventsMiniCalendarWidget’,$instance, $args );
    I didn’t see a way, however, is there a parameter within the $instance that accepts a month?

    #892492
    Jon Nixon
    Participant

    So I figured out that I could use eventDate to in the $instance and create full year of calendars using the following:

    <?php

    for ($i = 0; $i <= 12; $i++) {

    $instance = array(
    ‘title’ => ”,
    ‘count’ => 0,
    ‘eventDate’ => date(“Y-m”, strtotime(“+{$i} months”))
    );

    the_widget( ‘TribeEventsMiniCalendarWidget’, $instance);
    }
    ?>

    #897231
    Josh
    Participant

    Hello nixonmedia,

    Thanks for following up with us!

    I’m glad you were able to find a solution! I’ll go ahead and close this ticket. If you have any further questions, please don’t hesitate to open a new one.

    Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Have 12 months of mini calendars’ is closed to new replies.