Date of birth:

The date must be in the format mm/dd/yyyy with a valid
   month and day and the year in the 1900s or 2000s.

The date must not be blank.


The date of your first marriage:

The date must be in the format mm/dd/yyyy with a valid
   month and day and the year in the 1900s or 2000s.

The date must not be blank.

 

The textboxes above are a working sample (also View page Source).

 

The javscript in the head of the webpage, for checking for valid dates, will work with any number of textfields
being checked for date (each in exactly the same way).  The key thing is: Each of these text inputs
must be in a div as below, followed by a div containing the paragraph (p), containing the three spans.
All the returns or newlines indicated ARE ABSOLUTELY REQUIRED (because we count on that white
space being there (and counting as a child of the div or p)). You also must have css on this page in your head.  :

You can use this exact same code over and over for any number of textboxes to receive dates (and
be checked on any one page !! (may be best to copy the code from the html file itself, rather than below):

<div style="float: left">
Date of birth: <input type="text" size="10" title="MM/DD/YYYY" value="mm/dd/yyyy" onfocus="theret=makeBiggies(this); if(theret) {span2.style.display = 'none'; if(this.value == 'mm/dd/yyyy') this.value = '';}" onchange="if(this.value != '') span2.style.display = 'none'; isValidDate(this);" onblur="if(this.value == '' || this.value == 'mm/dd/yyyy') { span2.style.display = 'inline'; this.value='mm/dd/yyyy'}" />
</div>
<div style="float: left; width: 270px">
<p style="font-size: x-small; text-align: right; width:20px; position: relative; z-index: -100; margin-left:3px; padding: 3px; top: 0px; line-height:1em; display: inline; font-weight: bold;">
<span class="hiddenmessage">The date must be in the format mm/dd/yyyy with a valid<br />&nbsp;&nbsp; month and day and the year in the 1900s or 2000s.</span>
<span class="hiddenmessage">
<br />The date must not be blank.</span>
<span class="hiddenmessage"></span></p>
</div>

 

Get the zip with this page in it at: THIS LINK