diff --git a/js/scheduler.js b/js/scheduler.js index f3e859c2a..b1bc765c4 100644 --- a/js/scheduler.js +++ b/js/scheduler.js @@ -312,8 +312,8 @@ day = parseInt(this.$element.find('.repeat-monthly-date .selectlist').selectlist('selectedItem').text, 10); pattern += 'BYMONTHDAY=' + day + ';'; } else if (type === 'bysetpos') { - days = this.$element.find('.month-days').selectlist('selectedItem').value; - pos = this.$element.find('.month-day-pos').selectlist('selectedItem').value; + days = this.$element.find('.repeat-monthly-day .month-days').selectlist('selectedItem').value; + pos = this.$element.find('.repeat-monthly-day .month-day-pos').selectlist('selectedItem').value; pattern += 'BYDAY=' + days + ';'; pattern += 'BYSETPOS=' + pos + ';'; } @@ -323,13 +323,15 @@ type = this.$element.find('input[name=repeat-yearly]:checked').val(); if (type === 'bymonthday') { + // there are multiple .year-month classed elements in scheduler markup month = this.$element.find('.repeat-yearly-date .year-month').selectlist('selectedItem').value; - day = this.$element.find('.year-month-day').selectlist('selectedItem').text; + day = this.$element.find('.repeat-yearly-date .year-month-day').selectlist('selectedItem').text; pattern += 'BYMONTH=' + month + ';'; pattern += 'BYMONTHDAY=' + day + ';'; } else if (type === 'bysetpos') { - days = this.$element.find('.year-month-days').selectlist('selectedItem').value; - pos = this.$element.find('.year-month-day-pos').selectlist('selectedItem').value; + days = this.$element.find('.repeat-yearly-day .year-month-days').selectlist('selectedItem').value; + pos = this.$element.find('.repeat-yearly-day .year-month-day-pos').selectlist('selectedItem').value; + // there are multiple .year-month classed elements in scheduler markup month = this.$element.find('.repeat-yearly-day .year-month').selectlist('selectedItem').value; pattern += 'BYDAY=' + days + ';';