On several occasions when developing web applications it is necessary to have users provide dates as input. There are several ways to have the user input a date in an HTML form: enter as text, select from drop down list, choose from a calendar, etc.
Using the Control in your own applications
The link tag may be included in the header of your document, the script tag must always reside within the body. Once you've included these two files it is a simple matter to add Calendar Popup Controls to your form fields.
Add an onfocus attribute to your input tags which calls the showCalendarControl function. Below is an example:
<input name="todays_date" onfocus="showCalendarControl(this);" type="text">
That's it, users can now input dates into your form fields in a consistent format from an easy to use interface. Please send suggestions for improvement to email@example.com.
This code is for use by Purdue University staff, students, and departments. It is not licensed for public download.
Last modified: 2007/10/31 11:03:11.971000 GMT-4 by
Created: 2007/10/31 11:03:11.971000 GMT-4 by brian.r.brinegar.1.
Type in a few keywords describing what information you are looking for in the text box below.