From: helge Date: Wed, 20 Jul 2005 10:16:53 +0000 (+0000) Subject: fixed date comparison X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0122e57333e00c1ddfe9f76fffec0c63ab9fba5f;p=scalable-opengroupware.org fixed date comparison git-svn-id: http://svn.opengroupware.org/SOGo/trunk@837 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/UI/WebServerResources/ChangeLog b/SOGo/UI/WebServerResources/ChangeLog index 5cc90a10..f310a951 100644 --- a/SOGo/UI/WebServerResources/ChangeLog +++ b/SOGo/UI/WebServerResources/ChangeLog @@ -1,5 +1,8 @@ 2005-07-20 Helge Hess + * UIxAppointmentEditor.js: properly use getDate() instead of getDay() + for date comparison (#1478) + * UIxAppointmentEditor.js: properly validate startdate/enddate so that startdate is always before the enddate (#1478) diff --git a/SOGo/UI/WebServerResources/UIxAppointmentEditor.js b/SOGo/UI/WebServerResources/UIxAppointmentEditor.js index 3277096d..1de34b0c 100644 --- a/SOGo/UI/WebServerResources/UIxAppointmentEditor.js +++ b/SOGo/UI/WebServerResources/UIxAppointmentEditor.js @@ -27,8 +27,8 @@ function uixEarlierDate(date1, date2) { if (date1.getMonth() < date2.getMonth()) return date1; if (date1.getMonth() > date2.getMonth()) return date2; // same month - if (date1.getDay() < date2.getDay()) return date1; - if (date1.getDay() > date2.getDay()) return date2; + if (date1.getDate() < date2.getDate()) return date1; + if (date1.getDate() > date2.getDate()) return date2; // same day return null; }