From 75feb92950ebe0c0246ecbc29596d489eee7acc1 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 21 Aug 2014 13:31:10 +0000 Subject: [PATCH] fix date arithmetic date.getTime() is milisecs not secs --- calendar/js/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/calendar/js/app.js b/calendar/js/app.js index f664f78df5..6f56227c59 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -155,7 +155,7 @@ app.classes.calendar = AppJS.extend( if (match[1]== _id) do_refresh = true; } }); - if (jQuery('div [id^="infolog'+_id+'"],div [id^="drag_infolog'+_id+'"]').length > 0) do_refresh = true; + if (jQuery('div [id^="infolog'+_id+'"],div [id^="drag_infolog'+_id+'"]').length > 0) do_refresh = true; switch (_type) { case 'add': @@ -602,7 +602,7 @@ app.classes.calendar = AppJS.extend( { //Get infologID if in case if it's an integrated infolog event var infolog_id = eventId.split('infolog')[1]; - + if (infolog_id) { // If it is an integrated infolog event we need to edit infolog entry @@ -1260,7 +1260,7 @@ app.classes.calendar = AppJS.extend( if (startDate) { var date = new Date(startDate); - date.setTime(date.getTime() - parseInt(alarm_options.get_value())); + date.setTime(date.getTime() - 1000 * parseInt(alarm_options.get_value())); alarm_date.set_value(date); } }