aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-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;
});