Fix end date changes when editing if the event spans daylight savings time change

This commit is contained in:
Nathan Gray 2015-09-29 14:49:37 +00:00
parent 0dd3c78346
commit 5ac8ef6193

View File

@ -790,7 +790,9 @@ app.classes.calendar = AppJS.extend(
if (typeof duration != 'undefined' && typeof end != 'undefined') if (typeof duration != 'undefined' && typeof end != 'undefined')
{ {
end.set_disabled(duration.get_value()!==''); end.set_disabled(duration.get_value()!=='');
if (!end.disabled )
// Only set end date if not provided, adding seconds fails with DST
if (!end.disabled && !content.end)
{ {
end.set_value(start.get_value()); end.set_value(start.get_value());
if (typeof content.duration != 'undefined') end.set_value("+"+content.duration); if (typeof content.duration != 'undefined') end.set_value("+"+content.duration);