You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/12/02 14:02:15 UTC
DO NOT REPLY [Bug 37755] New: -
[validator]javascript date validation failure
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37755>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=37755
Summary: [validator]javascript date validation failure
Product: Commons
Version: unspecified
Platform: Other
OS/Version: other
Status: NEW
Severity: major
Priority: P2
Component: Validator
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: franck1993@yahoo.fr
if neither datePattern nor datePatternStrict is specified in validation.xml,
the validation should use the short date pattern of user's locale or default
locale. The client side validation always fails (javascript error occurs) when
no date pattern is specified for the field.
Javascript error in function "validateDate(form)" :
datePattern has no properties on line :
if ((field.type == 'hidden' ||
field.type == 'text' ||
field.type == 'textarea') &&
(value.length > 0) && (datePattern.length > 0) &&
I suggest that function is modified so it tests whether datePattern is null
after instruction "datePattern = oDate[x][2]("datePattern");" and if so
initializes it to a global javascript variable that would be dynamically
generated with a value based on the locale : ((SimpleDateFormat)
DateFormat.getDateInstance(DateFormat.SHORT, theUsersLocale)).toPattern
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org