Author: ktlili
Date: Thu May 24 12:15:38 2007
New Revision: 17372

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D17372&repname=
=3Djahia
Log:
- fix date picker selection bug [JAHIA-1900]

Modified:
    trunk/core/src/webapp/jsp/jahia/engines/shared/date_field.jsp

Modified: trunk/core/src/webapp/jsp/jahia/engines/shared/date_field.jsp
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/webapp=
/jsp/jahia/engines/shared/date_field.jsp&rev=3D17372&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/webapp/jsp/jahia/engines/shared/date_field.jsp (original)
+++ trunk/core/src/webapp/jsp/jahia/engines/shared/date_field.jsp Thu May 2=
4 12:15:38 2007
@@ -163,7 +163,16 @@
     }
 =

     function onCalendarUpdate<%=3DcontextId%>(calendar) {
-        document.mainForm.elements["_<%=3DtheField.getID()%>"].value =3D c=
alendar.date.getTime();
+        if (calendar.dateClicked) {
+            document.mainForm.elements["_<%=3DtheField.getID()%>"].value =
=3D calendar.date.getTime();
+        }
+    }
+
+    function onSelect<%=3DcontextId%>(calendar, date) {
+        if (calendar.dateClicked) {
+            var input_field =3D document.mainForm.elements["_datebox<%=3Dt=
heField.getID()%>"];
+                       input_field.value =3D date;
+           }
     }
 =

 </script>
@@ -207,6 +216,7 @@
         align              :   "TR",           // alignment (defaults to "=
Bl")
         singleClick        :   false,
         onUpdate        :    onCalendarUpdate<%=3DcontextId%>,
+        onSelect        :    onSelect<%=3DcontextId%>,
         showsTime          :   true
     });
 </script>

_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list

Reply via email to