The User Guide for Xin Calendar Mods
Many times I was asked to add this or that feature to the calendar script, some of these requested features were quite essential such as date range checking, and some were just optional such as long date format.
However, each user has his own needs for a calendar script, features critical to this user might be just wastes to another. I realized that an all-in-one calendar is not going to work very well for all the users, and I should code the calendar in a way that each user will be able to pick the desired calendar features exactly, and thus comes the Xin Calendar Mods.
Xin Calendar Mods is a collection of the core scripts and their mod scripts. The core scripts are the revised and trimmed versions of the Xin Calendar scripts, they provide the basic calendar function (aka, pops up to pick a date and you can change the calendar style), additional calendar features, such as date range checking, are coded as separated mod scripts.
When an user embeds the calendar to his web page, he will include the core script and the mod scripts he needs, and use the function calls provided by mod scripts to tailor his calendar.
See these two links for examples:
- Month/Year List Mod
- Date Tips Mod
- Special Days Mod
Download the zip file: cal_core_lite.zip
Just like we have In-Page calendar (cal.js), Popup Window calendar (cal2.js) and In-Page Pro calendar (cal4.js) in Xin Calendar, we have the counterpart core scripts in Xin Calendar Mods:
In-Page Core (cal_core.js)
the core script for in-page calendars, comes with the following basic function calls (please refer to Xin Calendar User Guide for details on these function calls) :
The In-Page Core supports multiple static calendars as well.
Popup Window Core (cal2_core.js)
the core script for popup window calendars, comes with the following basic function calls:
In-Page Pro Core (cal4_core.js)
the core script for in-page calendars with advanced styling features, comes with the following basic function calls:
Currently we have the following mod features:
enables date range checking for the core scripts, comes with the following function calls:
supports date format like "Wednesday, March 20, 2003", comes with the following function call:
supports two digit years in date format, comes with the following function call:
lets you define the month/year title in your own format, comes with the following function call:
lets you use selection lists for month/year scrolling, comes with the following function call:
lets you define links for dates and load/popup the link page when you click on a date, comes with the following function calls:
lets you load/popup a page when click on a date, the page is named according to the date format, comes with the following function calls:
pops up a tip box when you hover a date, comes with the following function calls:
use different colors for special days:
Not all the mod features are available to all the core scripts, and for the same mod feature, the mod script might be implemented separated for different core scripts. The following table shows the availability:
|Long Date Format||mod_long.js|
|Two Digit Years||mod_yy.js|
Click on a mod script to see its usage page.
Some mod features can be combined together, but some can't. And some features need special attention when combined. The following table shows the mod interference:
|Date Range ||+||+|
|Long Date Format ||+||×||+||+|
|Two Digit Years ||+||×||+||+|
|Calendar Title ||×|
|Month/Year List ||×|
|Date Link ||+||+||×|||||
|Date Tips ||+||+|||
|Special Days |||
|×||: can not be used together|
|+||: see mod usage page for more details|
|||: the one included later will define the cell style for special dates|