Documentation

iCagenda user guide and tips

3.3.3 : Change 'cal_date' to 'data-cal-date'

The custom attribute name 'cal_date' is not valid. It was discovered that it must start with 'data-' (to avoid possible future conflicts as html5 is developed) so changed to 'data-cal-date'.

 

UPGRADING YOUR CUSTOM THEME PACK

  1. Open YOUR_THEME_day.php in a text editor.

  2. Edit the 2 highlighted lines as shown below:

    1. Change cal_date to data-cal-date (line 32 in official default theme pack)
      		<?php // Color of date text depending of the category color ?>
      		<a>
      		<div class="<?php echo $stamp->ifToday; ?> <?php echo $bgcolor; ?>" data-cal-date="<?php echo $stamp->this_day; ?>">
      			<?php echo $stamp->Days; ?>
      		</div>
      		</a>
      

       

    2. Change cal_date to data-cal-date (line 116 in official default theme pack)

      <?php // Day with no event ?>
      <?php }else{ ?>
      	<div class="<?php echo $stamp->ifToday; ?>" data-cal-date="<?php echo $stamp->this_day; ?>">
      		<?php echo $stamp->Days; ?>
      	</div>
      <?php } ?>
      

       

  3. You can test this file by selecting the 'Visitor Time Zone' option in module iC calendar. If no alert message, all your theme packs are upgraded.

Follow Us

Search