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
    Priority: Trivial


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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

Reply via email to