Javascript error in <x:inputCalendar> component
-----------------------------------------------

         Key: MYFACES-681
         URL: http://issues.apache.org/jira/browse/MYFACES-681
     Project: MyFaces
        Type: Bug
  Components: Tomahawk  
    Versions: 1.1.0    
    Reporter: Ricardo Tercero Lozano


When rendering inputCalendar as a JSpopup, a JS error shows up by clicking on 
the year list. The Calendar popup dissapears. the JS error is:

str.charAt is not defined.

I've resolved it with a little modification in popcalendar.js:

function formatInt(str){

    if(typeof str != "undefined"){

          //truncate 0 for number less than 10
      if (str.charAt && str.charAt(0)=="0"){     // <----- Change, added 
str.charAt for method availability detection
         return str.charAt(1);
      }

    }
          return str;

}



-- 
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

Reply via email to