mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-02 12:32:55 +00:00
Bugzilla Bug 315719 Events with neither DTEND nor DURATION handled incorrectly (end date is default value 01-Jan-1970). r=mvl, patch by ssitter@googlemail.com
This commit is contained in:
parent
ca9e1e593e
commit
c0d780179a
@ -216,6 +216,19 @@ calEvent.prototype = {
|
||||
this.endDate.addDuration(event.duration);
|
||||
}
|
||||
|
||||
// If endDate is still invalid neither a end time nor a duration is set
|
||||
// on the event. We have to set endDate ourselves.
|
||||
// If the start time is a date-time the event ends on the same calendar
|
||||
// date and time of day. If the start time is a date the events
|
||||
// non-inclusive end is the end of the calendar date.
|
||||
if (!this.endDate.isValid) {
|
||||
this.endDate = this.startDate.clone();
|
||||
if (this.startDate.isDate) {
|
||||
this.endDate.day += 1;
|
||||
this.endDate.normalize();
|
||||
}
|
||||
}
|
||||
|
||||
// Importing didn't really change anything
|
||||
this.mDirty = false;
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user