The example below shows the script in action:

Example 1 - Basic

Basic date-picker without any custom properties set:

Example 2 - Customized

Date picker with custom-properties set.
The one on the left excludes the christmas days in 2008 and 2009, allows the user to only pick dates 5 days into the future and later and doesn't allow saturday, sunday and monday to be picked
The second one (on the right) is the same as the first one, but with only 2008 and 2009 as selectable years and the european date format instead of the american.

It also shows it compensates for a nasty obstacle in Internet Explorer that most other calendar / date pickers don't overcome: it hides any SELECT-tags that fall underneath the calendar. Not hidding them would result in the SELECT tag being displayed on top of the calendar, which is particularly problematic if it thereby disables the close-button (X)

When an existing target-element has been selected, this element (which should be an INPUT tag) will receive the choosen date. When the target element is specified as false or doesn't exist, the calendar will not allow you to pick a date (because it lacks a target to copy it too). It will open up though, so it can be used as a normal calendar.

The calendar will show which date has already been choosen (in the target element) if applicable and also the current date. All styles can be set in a stylehseet, so the calendar can have every desired appearance.

Example 3 - Just a calendar

And finally just a calendar, using the settings of the first one (no custom settings) without any pickable dates:






X
SuMoTuWeThuFrSa