Repeat day options are checked off for unselected occurrence filters and saved to the RRULE data.
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #2945377. --> Reported by: [kevinquillen](https://www.drupal.org/user/317279) Related to !6 >>> <p>I think there is a bug in the widget code that is causing duplicate values to be saved to the RRULE, and I think its because this loop is used multiple times to set default values on the widget:</p> <pre>&nbsp;&nbsp;&nbsp; _.each(RRule.DAYCODES, function (element, index) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var d = RRule[element];<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tmpl += '&lt;label class="inline"&gt;';<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tmpl += '&lt;input type="checkbox" name="byweekday" value="' + d.weekday + '" /&gt;';<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tmpl += RRule.DAYNAMES[index] + '&lt;/label&gt;';<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });</pre><p>This loops through and sets default values. If I create a node and set a date, lets say I choose Weekly, and pick a few days and save. The first save is fine.</p> <p>When I go back to edit the node, the RRULE day values are now duplicated - its setting the MONTHLY values and using them in the RRULE creation as well, even though MONTHLY is not selected. This does not seem to affect the date creation, but does impact the saved RRULE information.</p> <p>Where the widget code is generating the RRULE, it needs to ensure it is only pulling the entered values from the currently active occurrence.</p>
issue