Easy PHP Calendar - We really take care of your dates!


Go Back   Easy PHP Calendar > General Discussion > Customizations (Themes / Templates)

Customizations (Themes / Templates) Help with customizing the themes and templates. Post your own custom themes for others to enjoy.

Closed Thread
 
Thread Tools Search this Thread Display Modes

How to advance one month at a time?
Old 11-28-2005, 10:32 AM   #1
deck2deck
Calendar User
 
deck2deck is offline
Join Date: Apr 2005
Posts: 20
Default How to advance one month at a time?

Hello all! I've successfully set up this calendar and am very pleased with the way it looks and operates!!

I'm using the 3-month display, but when the user clicks on the forward or back arrows, it advances to the next set of 3 months.

I'm sure there must be an easy way to advance the calendar one month at a time (i.e. now it's showing Oct-Nov-Dec, would like to advance to show Nov-Dec-Jan, then Dec-Jan-Feb, etc.). I've looked and looked and read & re-read the directions but cannot find.

In case it's out there in plain sight, would someone direct me? Thanks!!!!!
 

Old 11-28-2005, 10:45 AM   #2
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,878
Default

The multi-calendar generator is designed to advance as many months as is being displayed.

You can make it advance only 1 month, but it will require writing your own navigation routine to construct the next and previous buttons (by adding or subtracting 1 from the $mo variable).

Here is a short, quick way to do this:

PHP Code:
 <?php
$prevMo 
$mo-1;
$prevYr $yr;
if (
$prevMo=0) {$prevMo=12$prevYr--;}

$nextMo $mo+1;
$nextYr $yr;
if (
$nextMo=13) {$nextMo=1$nextYr++;}
?>
Then add your own links like this:

<a href='YourFileName.php?mo=$prevMo&$yr=prevYr'>Prev ious</a>
<a href='YourFileName.php?mo=$nextMo&$yr=nextYr'>Next </a>


You'll probably want to format them differently and align then with the calendars.
__________________
-- Brian

Questions?

Instructions: Version 6 - Version 7 | FAQ | Errors FAQ | Paths FAQ | Forums | Support
| Web Site Hosting
 
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Clickable month titles in MUTLI view alexjudd General Support 1 08-25-2005 08:40 AM
Six Month CALENDAR? Mark MT General Support 9 03-17-2005 08:54 AM
HELP: ESCAL Moves a day Forward for rest of Month and then OK again?? jvilla General Support 5 09-24-2004 08:45 AM



All times are GMT -4. The time now is 06:20 AM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright 2009 NashTech, Inc.

| Home | Register | Today's Posts | Search | New Posts |