@@ -204,14 +142,7 @@ export default function RRuleEteSync(props: PropsType) {
style={{ alignSelf: 'flex-end', marginLeft: 20 }}
onChange={(event: React.FormEvent<{ value: unknown }>) => {
const freq = (event.target as HTMLSelectElement).value as Frequency;
- const updatedOptions = {
- freq: freq,
- bysetpos: undefined,
- bymonthday: freq === 'MONTHLY' || 'YEARLY' === freq ? [1] : undefined,
- byweekday: undefined,
- bymonth: freq === 'YEARLY' ? [Months.Jan] : undefined,
- };
- updateRule(updatedOptions);
+ updateRule({ freq: freq });
}}
>
{menuItemsFrequency}
@@ -265,34 +196,40 @@ export default function RRuleEteSync(props: PropsType) {
{options.freq === 'YEARLY' &&
- Months
-
+
+ Months
+
+
}
{(options.freq && options.freq !== 'DAILY') &&
- Weekdays
-
+
+ Weekdays
+
+
}