Format Date | JavaScriptSource

Format Date

Richard Gorremans Mar 1, 2001
Automatically formats date fields as the user enters the information. Also validates the date when complete date has been entered. Cross browser compatible, including Netscape 6+. Great!
Enter 1st. Date - mm/dd/yyyy Format
Enter 2nd. Date - yyyy/mm/dd Format
Enter 3rd. Date - dd/mm/yyyy Format
Automatic Formatting For Date Fields
Navigator 4.x versions Formatting will happen when all 8 numbers are entered.
Navigator 6.x versions Formatting will happen as you enter the numbers.
IE versions Formatting will happen as you enter the numbers.
Date Validation Will Occur As You Leave Field

The JavaScript Source: Forms: Format Date

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Command-s). The script is yours!!!

    

Did you use this script?  Do you like this site?  Please link to us!

Leave a Response

(
0 comments)