aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/event_head.tpl
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-11-25 17:28:26 +0100
committerMario Vavti <mario@mariovavti.com>2015-11-25 17:28:26 +0100
commitab71e33d832c9207a7244436e5f40c51c7164a44 (patch)
tree55bd533585a828f95e543b1f367dbdf902062d60 /view/tpl/event_head.tpl
parentfe57e7059bc6ef1942a6b054a4da8edfb5a07578 (diff)
downloadvolse-hubzilla-ab71e33d832c9207a7244436e5f40c51c7164a44.tar.gz
volse-hubzilla-ab71e33d832c9207a7244436e5f40c51c7164a44.tar.bz2
volse-hubzilla-ab71e33d832c9207a7244436e5f40c51c7164a44.zip
note to self: do not make things more complicated than they need to be.
Diffstat (limited to 'view/tpl/event_head.tpl')
-rwxr-xr-xview/tpl/event_head.tpl5
1 files changed, 3 insertions, 2 deletions
diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl
index 7c252f446..a7a455d50 100755
--- a/view/tpl/event_head.tpl
+++ b/view/tpl/event_head.tpl
@@ -118,8 +118,9 @@
$('#id_start_text').change(function() {
var origfval = $('#id_finish_text').val();
var sval = $('#id_start_text').val();
- var diff = origsval > sval ? moment(origsval).diff(sval) : moment(sval).diff(origsval);
- var fval = origsval > sval ? moment(origfval).subtract(diff, 'millisecond').format("YYYY-MM-DD HH:mm") : moment(origfval).add(diff, 'millisecond').format("YYYY-MM-DD HH:mm");
+ var diff = moment(sval).diff(origsval);
+ var fval = moment(origfval).add(diff, 'millisecond').format("YYYY-MM-DD HH:mm");
+
$('#id_finish_text').val(fval);
origsval = sval;
});