Tigra Calendar is a free JavaScript control that makes it easy for the website users to fill out the date/time fields by selecting the date from a popup calendar. Script saves the time for those internet/intranet developers who need intuitive, easy to use cross-browser client-side date or timestamp input control.
Tigra Calendar works with any browser that supports DOM (Document Object Model). Here is a table of the tested application compatibility:
| Platform | Browser | |||||
|---|---|---|---|---|---|---|
| MS IE | Netscape | Mozilla | Opera | Safari | AOL | |
| Windows 95/98/ME/2000/XP | 4.x+ | 4.x+ | 0.9.x+ | 5.x+ | 3.x+ | 4+ |
| Mac OS 8.6/9 | 5.x+ | 4.x+ | 1.1+ | n/a | 1.x+ | n/a |
| KDE on Linux/FreeBSD | n/a | 4.x+ | 1.1+ | 6.1+ | n/a | n/a |
Tigra Calendar script consists of several files. This makes calendar maintenance easier and reduces network load.
Default distribution package contains:
Note: The calendar.html file must be placed in the same directory where a calling page deployed. Otherwise the path in window.open(..) call inside calendar?.js must be adjusted.
Script files should be attached to HTML document with appropriate tags in header:
<head> <!-- some header data --> <script language="JavaScript" src="calendar1.js"></script> <script language="JavaScript" src="calendar2.js"></script> </head>
Tigra Calendar is attached to the form field. First of all make sure your HTML document has valid form with some unique name and some form field:
<form name="some_form_name" ... > <input type="Text" name="input1" value=""> <!-- some inner HTML of the form --> </form>
Note: '...' in the code sample means 'other form attributes here'. Remove those dots when copying that code to your HTML document.
When initializing your calendar you should create calendar object(s) just after form tag closed. Then specify form element as the only parameter (document.forms['formname'].elements['inputname']).
For instance:
var cal1 = new calendar1(document.forms['tstest'].elements['input1']);
Note: you can have as many calendar objects as you need for your application.
Calendar should be called inside existing form:
<a href="javascript:cal1.popup();"></a>
Calendar settings are variables which values can be set before calendar constructor call.
Below is the list of supported settings with descriptions:
| Key | Description | Accepted Values | Default Value | |
|---|---|---|---|---|
| General | ||||
| NUM_CENTYEAR | if two digit year input dates after this year considered 20 century | number | 30 | |
| BUL_TIMECOMPONENT | time input control required by default | true | false | |
| BUL_YEARSCROLL | year scrolling buttons required by default | true | false | |
| ARR_MONTHS | months as they appear in the calendar's title; can be adopted to national specifity | array of strings | ["January", "February", "March", "April", "May", "June","July", "August", "September", "October", "November", "December"] | |
| ARR_WEEKDAYS | week day titles as they appear on the calendar; can be adopted to national specifity | array of strings | ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"] | |
| NUM_WEEKSTART | day week starts from (normally 0-Su or 1-Mo) | 0 - 6 | 1 | |
| STR_ICONPATH | path to the directory where calendar images are stored (trailing slash required) | string | 'img/' | |
Note: if you want to specify those settings you should change variable value in the working file.
Tigra Calendar is FREE for any kind of applications. There is no license fee or royalty fee to be paid
at any time for using the Tigra Calendar
You may include the source code or modified source code within your
own projects for either personal or commercial use but excluding the restrictions outlined below.
The following restrictions apply to all parts of the component, including all source code,
samples and documentation: