- {options.freq === 'YEARLY' &&
-
-
- Months
-
-
-
- }
{(options.freq && options.freq !== 'DAILY') &&
@@ -220,7 +235,7 @@ export default function RRuleEteSync(props: PropsType) {
}
-
- Ends
-
-
- {options.until &&
-
{
- const value = date ? date : null;
- updateRule({ until: ICAL.Time.fromJSDate(value, true) });
- }}
- />
- }
- {options.count &&
+ {options.freq === 'MONTHLY' &&
) => {
event.preventDefault();
- const inputNode = event.currentTarget as HTMLInputElement;
- if (inputNode.value === '') {
- updateRule({ count: 1 });
- } else if (inputNode.valueAsNumber) {
- updateRule({ count: inputNode.valueAsNumber });
+ const value = (event.currentTarget as HTMLInputElement).value;
+ const numberValue = Number(value);
+ if (value === '') {
+ updateRule({ bymonthday: undefined });
+ } else if (numberValue < 32 && numberValue > 0) {
+ updateRule({ bymonthday: [numberValue] });
}
}}
/>
}
+ {options.freq === 'YEARLY' &&
+
+
+ Months
+
+
+
+ }
>
);