Ajas, what you're being tripped up by is the fact that you're using a suffix of _date for your input field. This goes back to an old approach to doing server-side field validation that's existed for years. The problem is that CF is being confused by your _date field name (absence_date) and it thinks you want to validate a field called "absence" as a date field. And in the bargain, it's also changing its datatype to the odbcdatetimeformat.
The bottom line is that sadly you can't use _date as a field name and not have CF change it to that ODBC datetime format on submission. It's an inherent feature, and one that many have been tripped up by over the years. In fact, I blogged about it (well, before we had blogs) on my old systemanage.com site 11 years ago, and you can still read it here: http://www.systemanage.com/cff/cftips3.cfm#_date Also, I'll add that I do realize you're using the new onServer option for ValidateAt. That attribute is new in CF 7, and what it does is under the covers it creates that very kind of hidden field validation, though it uses a new format for the name of the hidden field, to avoid this confusion. Sadly, CF still has backward compatibility for the old approach. So what you're doing (in using the onserver validation) isn't hurting you here, but it also doesn't fix the problem. The solution is to change the field (as you've created, absence_date) to use some other name, like absence-date, for instance, or absencedate. Hope that helps. /charlie From: [email protected] [mailto:[email protected]] On Behalf Of Ajas Mohammed Sent: Thursday, February 12, 2009 9:42 AM To: [email protected] Subject: [ACFUG Discuss] weird cfinput vs input stuff. date is shown as {d '2009-02-12'} vs 02/12/2009 Hi, I noticed this in my form submission and dont know why cfinput with validation would show date as {d '2009-02-12'} whereas regular input would show same value as 02/12/2009 . See code below : <cfloop from="1" to="10" index="thisrow"> <cfinput type="text" name="absence_date#thisrow#" size="10" value="" validate="date" validateat="onBlur,onSubmit,onServer" message="You have entered an invalid date. Date's should be in this format MM/DD/YYYY or MM-DD-YYYY."> <input type="text" name="absence_date_txtbox_#thisrow#" size="10" value=""> </cfloop> so in this form, i entered 02/12/2009 in both the textboxes and i get weird output. Any ideas??? I am I missing something obvious here??? <Ajas Mohammed /> http://ajashadi.blogspot.com We cannot become what we need to be, remaining what we are. No matter what, find a way. Because thats what winners do. You can't improve what you don't measure. Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives. ------------------------------------------------------------- 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 -------------------------------------------------------------
