Javascript DHTML calendar

 

Take back the web!
   Home   
   Projects   
   Forum   
 

What is the Swazz Javascript Calendar?

Download

Installation

Features

Example

Compatability

Some Background

Why sms.ac sucks | Forum

  What is the Swazz Javascript Calendar?

The javascript calendar available here is a free, lightweight widget which shows a calendar for use in picking dates on form fields.

Click on the text field below to see a demo




  Download

The first release : 1.0 (3rd Nov 2006)

Click here to download the latest version.


  Installation

Copy the calender.js script into a directory on your website.

Assuming you copy it into the same directory as the webpage you are going to use the calendar on, you would need the following

Step 1
Include the folllowing somewhere in the HTML of your page

<SCRIPT SRC="calendar.js"></SCRIPT>

NB: Make sure "src" points to the correct location of the calendar.js file

Step 2
Find the input text box you would like the calendar to appear on. Modify it to include the following

<input type="text" value="dd/mm/yy" onfocus="this.select();lcs(this)" onclick="event.cancelBubble=true;this.select();lcs(this)">

That will produce the following




  Features

- Lightweight, only 6kb in size! - Pure DHTML. No slow, external pages being loaded in iframes


  Example

Click here to see the example/demo page.


  Compatability

I have personally tested the calendar in these browsers

- IE6, IE7

- Firefox 1.5, Firefox 2.0

- Safari




  Some Background

This calendar was inspired by the calendar used on expedia.com - I really liked the functionality and speed it provided. It was a little large in size, however, and had one or two things I thought could be improved.

Upon searching around the net I only found calendars which were large (some 50kb+ in size!) and very few which were free.

I needed a calendar for a project I was working on so I designed my own. What you see here is an adapted, or more "generic", version of that calendar.