+
+ ) => {
+ event.preventDefault();
+ const inputNode = event.currentTarget as HTMLInputElement;
+ if (inputNode.value === '') {
+ updateRule({ interval: undefined });
+ } else if (inputNode.valueAsNumber) {
+ updateRule({ interval: inputNode.valueAsNumber });
+ }
+ }}
+ />}
+ />
+
+
+
+
+ {(options.freq === Frequency.Month) &&
+
+ }
+
+
+ {options.bysetpos &&
+
+ }
+ {(options.freq === Frequency.Year && options.bymonth) &&
+
+ }
+ {options.bymonthday &&
+ ) => {
+ event.preventDefault();
+ 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 !== Frequency.Day &&
+ {checkboxWeekDays}
+ }
+
+ Ends
+
+
+ {options.until &&
+ updateRule({ until: date })}
+ />
+ }
+ {options.count &&
+ ) => {
+ event.preventDefault();
+ const inputNode = event.currentTarget as HTMLInputElement;
+ if (inputNode.value === '') {
+ updateRule({ count: 1 });
+ } else if (inputNode.valueAsNumber) {
+ updateRule({ count: inputNode.valueAsNumber });
+ }
+ }}
+ />
+ }
+
+
+ );
+}