You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Marinschek (JIRA)" <my...@incubator.apache.org> on 2005/05/24 11:13:05 UTC
[jira] Closed: (MYFACES-181) onchange attribute for x:inputCalendar
[ http://issues.apache.org/jira/browse/MYFACES-181?page=all ]
Martin Marinschek closed MYFACES-181:
-------------------------------------
Resolution: Fixed
Fix Version: Nightly Build
Thanks to Galen Dunkleberger for the suggestion and the javascript code!
> onchange attribute for x:inputCalendar
> --------------------------------------
>
> Key: MYFACES-181
> URL: http://issues.apache.org/jira/browse/MYFACES-181
> Project: MyFaces
> Type: Improvement
> Environment: Fedora Core 3, Weblogic 8.1|JBoss 4
> Reporter: Galen Dunkleberger
> Assignee: Martin Marinschek
> Priority: Trivial
> Fix For: Nightly Build
>
> I know this is super trivial but it would be nice to have the onchange attribute available for the calendar component. Both for when the user selected a new date via the popup or if they enter a new date in the input box. I think it's really just a matter of adding the onchange attribute to the tag and adding a small line in the javascript....
> function jscalendarCloseCalendar() {
> jscalendarHideCalendar();
>
> if( jscalendarMyFacesCtlType!="x:inputDate" )
> {
> jscalendarCtlToPlaceValue.value = jscalendarConstructDate(jscalendarDateSelected,jscalendarMonthSelected,jscalendarYearSelected)
> var onchange=jscalendarCtlToPlaceValue.getAttribute("onchange");
> if(onchange)
> {
> eval(onchange);
> }
> }
> else
> {
> document.getElementById(jscalendarMyFacesInputDateClientId+".day").value = jscalendarDateSelected;
> document.getElementById(jscalendarMyFacesInputDateClientId+".month").value = jscalendarMonthSelected+1;
> document.getElementById(jscalendarMyFacesInputDateClientId+".year").value = jscalendarYearSelected;
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira