myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1098634 - in /myfaces/tomahawk/trunk: core/src/main/resources/org/apache/myfaces/custom/calendar/resource/date.js core20/src/main/javascript/oam.custom.calendar/date.js
Date Mon, 02 May 2011 15:48:10 GMT
Author: lu4242
Date: Mon May  2 15:48:10 2011
New Revision: 1098634

URL: http://svn.apache.org/viewvc?rev=1098634&view=rev
Log:
TOMAHAWK-1479 CLONE -t:inputCalendar displays year 1900 when an incorrect date is entered
(Thanks to Pavel Blinov for provide this patch)

Modified:
    myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/date.js
    myfaces/tomahawk/trunk/core20/src/main/javascript/oam.custom.calendar/date.js

Modified: myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/date.js
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/date.js?rev=1098634&r1=1098633&r2=1098634&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/date.js
(original)
+++ myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/date.js
Mon May  2 15:48:10 2011
@@ -415,6 +415,7 @@ proto._parsePattern = function(
     else
     {
       context.year = year;
+      context.ambiguousYear = false;
     }
 
     if (yearIsWeekYear)
@@ -437,6 +438,7 @@ proto._parsePattern = function(
     else
     {
       context.weekYear = year;
+      context.ambiguousWeekYear = false;
     }
   }
   else if (c == 'M')
@@ -608,6 +610,10 @@ proto._parsePostProcess = function(symbo
     }
   }
   
+  if (context.year <= 0) {
+    context.year = new Date().getFullYear();
+  }
+
   if (context.hourAmpm > 0)
   {
     if (context.ampm == 1)

Modified: myfaces/tomahawk/trunk/core20/src/main/javascript/oam.custom.calendar/date.js
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core20/src/main/javascript/oam.custom.calendar/date.js?rev=1098634&r1=1098633&r2=1098634&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core20/src/main/javascript/oam.custom.calendar/date.js (original)
+++ myfaces/tomahawk/trunk/core20/src/main/javascript/oam.custom.calendar/date.js Mon May
 2 15:48:10 2011
@@ -415,6 +415,7 @@ proto._parsePattern = function(
     else
     {
       context.year = year;
+      context.ambiguousYear = false;
     }
 
     if (yearIsWeekYear)
@@ -437,6 +438,7 @@ proto._parsePattern = function(
     else
     {
       context.weekYear = year;
+      context.ambiguousWeekYear = false;
     }
   }
   else if (c == 'M')
@@ -608,6 +610,10 @@ proto._parsePostProcess = function(symbo
     }
   }
   
+  if (context.year <= 0) {
+    context.year = new Date().getFullYear();
+  }
+
   if (context.hourAmpm > 0)
   {
     if (context.ampm == 1)



Mime
View raw message