simple jQuery date-picker plugin

last updated 3/12/09

Here's a nifty little date picker, but it's not complete. In fact, it may need YOUR help.

All the code here is original. I have to thank Mike Alsup for suggesting the development pattern that helped this go from one-off simple script to ready-to-use jQuery plugin.

You're welcome to use anything here as often as you like, even to include it as part of commercially release products. Please don't package and sell it as a standalone application.

Please send comments and suggestions (complete with any code changes/updates) to:


Some test inputs, each with a different setup:

Some more test inputs, each with the same setup:

What is does:

It is meant to NOT be an "everything-under-the-kitchen-sink" date picker. Just there to help a user pick a date.

How to use it:

Simply call $('input').simpleDatepicker(); on the set of elements you would like to work with.

Options

You can pass an object literal with some options that will be applied to all the datepickers setup with that call to simpleDatepicker()

$('input').simpleDatepicker({chosendate: , startdate: , enddate: , x: , y: });

an integer, without quotes is fine, like so: { x: 6, y: 10 }an integer, without quotes is fine, like so: { x: 6, y: 10 }
optionsvalues
[chosendate]date string matching mm/dd/yyyy or m/d/yyyy
[startdate]4 digit year or date string matching mm/dd/yyyy or m/d/yyyy
[enddate]4 digit year or date string matching mm/dd/yyyy or m/d/yyyy
[x]
[y]