You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by bu...@apache.org on 2004/08/31 17:03:43 UTC
DO NOT REPLY [Bug 30965] New: -
DatePicker calendar does not invoke onchange of TextInput
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=30965>.
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=30965
DatePicker calendar does not invoke onchange of TextInput
Summary: DatePicker calendar does not invoke onchange of
TextInput
Product: Tapestry
Version: 3.0
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Framework
AssignedTo: tapestry-dev@jakarta.apache.org
ReportedBy: jonathan.oconnor@xcom.de
If I set up a DatePicker component, and specify an onchange attribute for it,
then if I change the date by typing in the TextInput field, the onchange is called.
However, if I click on the Calendar and select a date that way, then the
onchange is not called. This is because, the onchange attribute is only written
on the TextInput field. The solution is very easy.
Change DatePicker.script in framework/src/org.apache/tapestry/form.
Instead of:
${calendarObject}.onchange = function() {
document.${formName}.${name}.value = ${calendarObject}.formatDate();
}
Add a line calling onchange():
${calendarObject}.onchange = function() {
document.${formName}.${name}.value = ${calendarObject}.formatDate();
document.${formName}.${name}.onchange();
}
I have tested this solution in both IE6.0 and Firefox 0.9.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org