aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/event_head.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl/event_head.tpl')
-rwxr-xr-xview/tpl/event_head.tpl13
1 files changed, 7 insertions, 6 deletions
diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl
index a7a455d50..ec43d7ab7 100755
--- a/view/tpl/event_head.tpl
+++ b/view/tpl/event_head.tpl
@@ -117,12 +117,13 @@
var origsval = $('#id_start_text').val();
$('#id_start_text').change(function() {
var origfval = $('#id_finish_text').val();
- var sval = $('#id_start_text').val();
- 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;
+ if(origfval) {
+ var sval = $('#id_start_text').val();
+ 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;
+ }
});
// ACL