Validating a date in javascript

Rated 3.89/5 based on 906 customer reviews

(16 printed pages) Introduction Getting Started Writing the Validation Script Connecting the Form to the Script Associating Form Fields with Custom Script Code Listing Conclusion When you create forms, providing form validation is useful to ensure that your customers enter valid and complete data.

validating a date in javascript-12

validating a date in javascript-33

validating a date in javascript-87

validating a date in javascript-25

The time field will allow input starting with 'hh:mm' following by an optional 'am' or 'pm'. The code behind the form is as follows: For each field in the form (first the dates, then the time field), a check is made as to whether the input is blank.

Solution: Tom Flynn from Sun Gard Higher Education provided the following Jave Script, which helped resolving the issue, so many thanks to Tom!

function Validate Form(ctrl) //-------------------------------------------------------------------------- //This function verifies if the start date is prior to end date.

Lisa Wollin Microsoft Corporation May 2004 Applies to: Microsoft® Office Front Page® 2003 Microsoft Front Page 2002 Microsoft Front Page 2000 Summary: Learn how validate HTML form fields using Java Script in Microsoft Office Front Page 2003.

This article assumes a general understanding of HTML and Java Script.

Leave a Reply