myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r673625 - in /myfaces/trinidad/trunk/trinidad-impl/src/main: java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputDateRenderer.java javascript/META-INF/adf/jsLibs/DateField.js
Date Thu, 03 Jul 2008 09:01:47 GMT
Author: matzew
Date: Thu Jul  3 02:01:46 2008
New Revision: 673625

URL: http://svn.apache.org/viewvc?rev=673625&view=rev
Log:
TRINIDAD-790 - datepicker selects wrong day

Thanks to Gregor Sfiligoj for his patch!

Modified:
    myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputDateRenderer.java
    myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/DateField.js

Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputDateRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputDateRenderer.java?rev=673625&r1=673624&r2=673625&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputDateRenderer.java
(original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputDateRenderer.java
Thu Jul  3 02:01:46 2008
@@ -199,6 +199,9 @@
     // =-=AEW What's this one?
     XhtmlUtils.addLib(context, arc, "_dfsv()");
     XhtmlUtils.addLib(context, arc, "_fixDFF()");
+    XhtmlUtils.addLib(context,
+                      arc,
+                      _DATE_TIME_ZONE_OFFSET_KEY);
     super.encodeAllAsElement(context, arc, component, bean);
 
     if (!getDisabled(bean))
@@ -218,9 +221,6 @@
     XhtmlUtils.addLib(context,
                       arc,
                       ConfigurationScriptlet.sharedInstance().getScriptletKey());
-    XhtmlUtils.addLib(context,
-                      arc,
-                      _DATE_TIME_ZONE_OFFSET_KEY);
 
     // Add the dialog styles so the picker window is skinned correctly
     if (CoreRenderKit.usePopupForDialog(context, RequestContext.getCurrentInstance()))

Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/DateField.js
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/DateField.js?rev=673625&r1=673624&r2=673625&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/DateField.js
(original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/DateField.js
Thu Jul  3 02:01:46 2008
@@ -27,9 +27,6 @@
   if ((dateField == (void 0)) || (newValue == (void 0)))
     return;
     
-  // adjust day light saving, if any
-  newValue += _getDayLightSavOffset(newValue);
-
   // Add back in the time
   // offset,since we don't want to overwrite the user's time when 
   // they pick a new date from the calendar. 
@@ -38,7 +35,7 @@
   // compare the time zone that is on the client with the time zone that
   // came from the localeContext on the server and adjust if necessary.
   // bug 3167883
-  newValue += _getLocaleTimeZoneDifference();
+  newValue += _getLocaleTimeZoneDifference2();
 
   var newDate = new Date(newValue);
 
@@ -344,7 +341,7 @@
  * server instead of the timezone we get from javascript's getTimezoneOffset.
  * see bug 3167883
  */
-function _getLocaleTimeZoneDifference()
+function _getLocaleTimeZoneDifference2()
 {
   var currentDate = new Date();
   // timeZoneOffset in javascript appears to give



Mime
View raw message