You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2012/12/05 15:56:57 UTC

svn commit: r1417459 - /myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/calendar.js

Author: lofwyr
Date: Wed Dec  5 14:56:56 2012
New Revision: 1417459

URL: http://svn.apache.org/viewvc?rev=1417459&view=rev
Log:
TOBAGO-1222: time component (tx:time) without number and lost focus then print NaN

Modified:
    myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/calendar.js

Modified: myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/calendar.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/calendar.js?rev=1417459&r1=1417458&r2=1417459&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/calendar.js (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/calendar.js Wed Dec  5 14:56:56 2012
@@ -356,9 +356,9 @@ function tbgTimerInputFocus(input, hour)
 
 function tbgTimerInputBlur(input) {
 //  LOG.debug("value XX = " + input.value);
-  var value = parseInt(input.value, 10);
+  var value = parseInt(input.value, 10); // use 10 to avoid parsing octal numbers, if the string begins with 0
 //  LOG.debug("value 3  = " + value);
-  if (value == NaN) {
+  if (isNaN(value)) {
     input.value = input.oldValue;
     return;
   }