diff --git a/calendar/js/app.js b/calendar/js/app.js index 7b7d8d7f94..0b9e1c680f 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -685,7 +685,9 @@ app.classes.calendar = AppJS.extend( if (typeof duration != 'undefined' && typeof end != 'undefined') { 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()); if (typeof content.duration != 'undefined') end.set_value("+"+content.duration); @@ -2025,7 +2027,7 @@ app.classes.calendar = AppJS.extend( do { - var expanded_date = ''+t.getUTCFullYear() + sprintf('%02d',t.getUTCMonth()+1) + sprintf('%02d',t.getDate()); + var expanded_date = ''+t.getUTCFullYear() + sprintf('%02d',t.getUTCMonth()+1) + sprintf('%02d',t.getUTCDate()); if(typeof(updated_days[expanded_date]) === 'undefined') { updated_days[expanded_date] = []; diff --git a/calendar/js/et2_widget_daycol.js b/calendar/js/et2_widget_daycol.js index 6a2a307ece..290c321ec7 100644 --- a/calendar/js/et2_widget_daycol.js +++ b/calendar/js/et2_widget_daycol.js @@ -237,7 +237,11 @@ var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResizea for(var i = 0; i < event_ids.length; i++) { var event = egw.dataGetUIDdata('calendar::'+event_ids[i]).data; - if(event && event.date && event.date === this.options.date) + if(event && event.date && ( + event.date === this.options.date || + // Accept multi-day events + new Date(event.start) <= this.date //&& new Date(event.end) >= this.date + )) { events.push(event); } @@ -420,7 +424,10 @@ var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResizea { var event = this._children[i].options.value || false; if(!event) continue; - if(event.date && event.date != this.options.date) + if(event.date && event.date != this.options.date && + // Multi-day events date may be different + (new Date(event.start) >= this.date || new Date(event.end) <= this.date ) + ) { // Still have a child event that has changed date (DnD) this._children[i].destroy();