diff --git a/ChangeLog b/ChangeLog index 75e9e759d..d7687eb9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-09-05 Wolfgang Sourdeau + * UI/WebServerResources/UIxAppointmentEditor.js: convert the + form's time values to integers before comparing them. + * UI/Scheduler/UIxCalAptListView.m ([UIxCalAptListView -currentStartTime]) ([UIxCalAptListView -currentEndTime]): initialize the resulting dates timezone with [self viewTimeZone]. diff --git a/UI/WebServerResources/UIxAppointmentEditor.js b/UI/WebServerResources/UIxAppointmentEditor.js index a4266c7e7..323f0e7b9 100644 --- a/UI/WebServerResources/UIxAppointmentEditor.js +++ b/UI/WebServerResources/UIxAppointmentEditor.js @@ -79,18 +79,17 @@ function validateAptEditor() { // TODO: check time var start, end; - start = document.forms[0]['startTime_time_hour'].value; - end = document.forms[0]['endTime_time_hour'].value; + start = parseInt(document.forms[0]['startTime_time_hour'].value); + end = parseInt(document.forms[0]['endTime_time_hour'].value); + if (start > end) { - window.alert("coucou1"); alert(labels.validate_endbeforestart); return false; } else if (start == end) { - start = document.forms[0]['startTime_time_minute'].value; - end = document.forms[0]['endTime_time_minute'].value; + start = parseInt(document.forms[0]['startTime_time_minute'].value); + end = parseInt(document.forms[0]['endTime_time_minute'].value); if (start > end) { - window.alert("coucou2"); alert(labels.validate_endbeforestart); return false; }