You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/05/02 22:49:33 UTC

svn commit: r1098787 - /myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js

Author: lu4242
Date: Mon May  2 20:49:32 2011
New Revision: 1098787

URL: http://svn.apache.org/viewvc?rev=1098787&view=rev
Log:
TOMAHAWK-1480 Calendar shows wrong year in Opera

Modified:
    myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js

Modified: myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js?rev=1098787&r1=1098786&r2=1098787&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js (original)
+++ myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js Mon May  2 20:49:32 2011
@@ -97,7 +97,7 @@ org_apache_myfaces_PopupCalendar = funct
     this.today = new Date();
     this.dateNow = this.today.getDate();
     this.monthNow = this.today.getMonth();
-    this.yearNow = this.today.getYear();
+    this.yearNow = this.today.getFullYear();
     
     // list of images to be preloaded from the server
     this.imgSrc = new Array("drop1.gif", "drop2.gif", "left1.gif", "left2.gif", "right1.gif", "right2.gif");
@@ -425,8 +425,9 @@ org_apache_myfaces_PopupCalendar.prototy
 
     if (!this.ns4)
     {
-        if (!this.ie)
-            this.yearNow += 1900;
+        /* Instead use getFullYear() */
+        /*if (!this.ie)
+            this.yearNow += 1900;*/
 
         this._hideCalendar();