Date Input and Calendar Popup Instructions
As promised in my Date input and calendar popup article, here are instructions.
In the head section of your page add the following lines.
<body> <div id="calcontainer"></div>
Add an input field to your form with a class of "dateparse".
<input type="text" size="10" id="dateField" class="dateparse">
Add a button or an image with an onclick event to access the calendar popup.
The only required items for the show method are event and the id of the date input field.
Here's the sample date parser and calendar popup.
Update: 3 May 2006 Forgot to check for mdyyyy when parsing a date from an input field. Fixed now.
Update: 22 Jul 2006 Added ability to set the drop down year menu to any start at any year.
Update: 3 Aug 2006 Added instructions on how to make click events work in Safari.
Add a comment
Discussion for this entry is now closed.