summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas <thomas@brotherli.ch>2011-08-23 21:17:09 (GMT)
committerThomas <thomas@brotherli.ch>2011-08-25 07:57:34 (GMT)
commit84c6b0a955714d372d57ecce9efe6ff33b14fc15 (patch)
treeccc86101398ba85fdf0c7f8ffb2d159807af6d1e
parentd857614c081a430167fd8a501c02b9fe8c820954 (diff)
downloadroundcubemail-plugins-kolab-84c6b0a955714d372d57ecce9efe6ff33b14fc15.tar.gz
Additional check when moving event after working hours
-rw-r--r--plugins/calendar/calendar_ui.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js
index 473ad84..df4a50d 100644
--- a/plugins/calendar/calendar_ui.js
+++ b/plugins/calendar/calendar_ui.js
@@ -1966,6 +1966,9 @@ function rcube_calendar_ui(settings)
event.end = new Date(start + numdays * DAY_MS);
event.end.setHours(settings['work_end'] || 18);
event.end.setMinutes(0);
+
+ if (event.end.getTime() < event.start.getTime())
+ event.end = new Date(event.start.getTime() + HOUR_MS);
}
// send move request to server