Scripts | JS tutorials | Advanced JS tutorials | Applets | Web Tutorials | DHTML | Forum | Freewarejava

spacer.gif (810 bytes)

Home / Free JavaScripts / Clocks, Calenders, And Timers / Here

JavaScript Kit

Cut & Paste Popup date picker

Credit: Denis Gritcyuk

Description: Make it easy for your visitors to fill out the date/time field(s) of your form, by selecting this info from a popup calendar.

Example:  

Click Here to Pick up the timestamp

Directions

Step 1: Insert the below into the <HEAD> section of your page:

Step 2: Insert the below sample form into the <BODY> section of your page:

Step 3: Finally, this script comes with 3 images and 1 external JavaScript file. Download the following zip file, and upload the containing 4 files onto your web server, in the same directory as where your webpage resides:

datepick.zip (download by right clicking, and selecting "save as")

That's it!

More info on configuring the script

As the sample form in Step 2 illustrates, to apply the date picker to a particular form field, use the code:

<a href="javascript:show_calendar('document.tstest.timestamp', document.tstest.timestamp.value);">
<img src="cal.gif" width="16" height="16" border="0"></a>

where the part in red references the name of your form then form field in question.


Adding more than one JavaScript to a page
Trying to get two or more scripts on your page to work concurrently? This tutorial reveals some tips on how to do so.


spacer.gif (810 bytes)

.
CopyRight © 1997-2001 JavaScript Kit. All rights reserved


spacer.gif (810 bytes)