From 0122e57333e00c1ddfe9f76fffec0c63ab9fba5f Mon Sep 17 00:00:00 2001 From: helge Date: Wed, 20 Jul 2005 10:16:53 +0000 Subject: [PATCH] fixed date comparison git-svn-id: http://svn.opengroupware.org/SOGo/trunk@837 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/UI/WebServerResources/ChangeLog | 3 +++ SOGo/UI/WebServerResources/UIxAppointmentEditor.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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; } -- 2.39.5