Maybe you could add something to the onFocus event, such as:

<cfinput disabled="#BOAdisabled#" type="datefield" name="date#i#" id="date#i#" 
value="#thisEffectiveDate#" maxlength="10" onblur="validateDateField(this, 
true);validateDescriptionLine(this);" 
onFocus="document.getElementByID('erroDiv').style.display='none';" 
validateat="onblur" style="width:90px"/>

Where 'errorDiv' is the div in question.

In any event, I think it's the onFocus event that's at the heart of it. You are 
validating on blur but as far as I see, you are not resetting anything on 
focus. I'm hardly a js guru or anything but that's my guess.

Hope this helps.


[cid:[email protected]]
___________________________________________________________________________________________

Troy Jones  |  Director of Technical Services  |  Dynapp Inc  |  1-800-830-5192 
 ext. 603  |  dynapp.com<http://www.dynapp.com/>  |  
facebook.com/dynapp<http://www.facebook.com/dynapp>

From: [email protected] [mailto:[email protected]] On Behalf Of Jeff Howard
Sent: Friday, February 05, 2010 2:54 PM
To: [email protected]
Subject: [ACFUG Discuss] input type=datefield validation question

I have a form that has a required input of type=datefiled.  If the user tabs 
thru and doesn't enter a date a hidden div with an error message saying the 
datefield is required becomes visible.  There is an onblur validation for this.

My problem is that if the user goes back and just clicks on the CF created 
datefield calendar and then tabs away the error message does not become 
invisible again.  Instead they have to actual type something in the text input 
next to the CF generated calendar control.

<cfinput disabled="#BOAdisabled#" type="datefield" name="date#i#" id="date#i#" 
value="#thisEffectiveDate#" maxlength="10" onblur="validateDateField(this, 
true);validateDescriptionLine(this);" validateat="onblur" style="width:90px"/>

My question is, does anyone know how to force the validation if the user just 
uses the control to pick the date?

Thanks,
Jeff



-------------------------------------------------------------

To unsubscribe from this list, manage your profile @ 

http://www.acfug.org?fa=login.edituserform



For more info, see http://www.acfug.org/mailinglists

Archive @ http://www.mail-archive.com/discussion%40acfug.org/

List hosted by http://www.fusionlink.com

-------------------------------------------------------------


<<inline: image001.jpg>>

Reply via email to