(web) Fix "last day of the month" repeat rule

This commit is contained in:
Francis Lachapelle
2017-08-29 14:29:11 -04:00
parent 5e5e52e3f1
commit 491e090fb4
3 changed files with 27 additions and 19 deletions

View File

@@ -1171,7 +1171,7 @@
// Update recurrence definition depending on selections
if (this.hasCustomRepeat()) {
if (this.repeat.frequency == 'monthly' && this.repeat.month.type && this.repeat.month.type == 'byday' ||
if (this.repeat.frequency == 'monthly' && this.repeat.month.type && this.repeat.month.type == 'byday' && this.repeat.month.day != 'relative' ||
this.repeat.frequency == 'yearly' && this.repeat.year.byday) {
// BYDAY mask for a monthly or yearly recurrence
delete component.repeat.monthdays;
@@ -1181,6 +1181,8 @@
this.repeat.month.type) {
// montly recurrence by month days or yearly by month
delete component.repeat.days;
if (this.repeat.month.day == 'relative')
component.repeat.monthdays = [this.repeat.month.occurrence];
}
}
else if (this.repeat.frequency && this.repeat.frequency != 'never') {