|
|
@ -122,7 +122,7 @@ export default function RRule(props: PropsType) {
|
|
|
|
function updateRule(newOptions: Partial<RRuleOptions>): void {
|
|
|
|
function updateRule(newOptions: Partial<RRuleOptions>): void {
|
|
|
|
let updatedOptions: RRuleOptions;
|
|
|
|
let updatedOptions: RRuleOptions;
|
|
|
|
if (!!options.freq && !!newOptions.freq && options.freq !== newOptions.freq) {
|
|
|
|
if (!!options.freq && !!newOptions.freq && options.freq !== newOptions.freq) {
|
|
|
|
updatedOptions = { freq: newOptions.freq };
|
|
|
|
updatedOptions = { freq: newOptions.freq, byday: ['SU'], bymonth: [1] };
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
updatedOptions = { ...options, ...newOptions } ;
|
|
|
|
updatedOptions = { ...options, ...newOptions } ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|