ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Unable to sync 2 Calendars showing different months

June 24, 2011 2:32pm

Subscribe [2]
  • #1 / Jun 24, 2011 2:32pm

    MichaelSimone

    76 posts

    I need to have 2 calendars in sync on the same page showing 2 dif months ie; calendar 1 showing “June” and calendar 2 =“July”

    When adding parameter month={next_date format="%m"} year={next_date format="%Y"} to 2nd calendar tag, system throws up errors. Appears it will not convert to simple month string “07”

    Any suggestions on what I’m doing wrong or a better solution!!!!!

  • #2 / Jun 27, 2011 6:13am

    John Henry Donovan

    12339 posts

    Hi Michael,

    What version and build of EE are you using?

    Those variable are for use within the calendar tags and not as parameters.

    You could use a bit of PHP to generate a variable of the the month ahead. Turn PHP on in your template and set it to Input

    <?php
    $offset_time = $this->EE->localize->decode_date('%m', $this.strtotime(" +1 month"));
    
    ?>
    
    month="<?php echo $offset_time; ?>"

    Moving this to Community Help as more appropriate there.
    Let us know if that helps?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases