sanity-plugin-recurring-dates 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Tom Smith
3
+ Copyright (c) 2025 Tom Smith
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/index.esm.js CHANGED
@@ -4254,6 +4254,11 @@ function Monthly(props) {
4254
4254
  setByweekday([newWeekday]);
4255
4255
  }
4256
4256
  }, [dayNo, setByweekday, weekNo]);
4257
+ useEffect(() => {
4258
+ if (!weekNo) {
4259
+ setByweekday(null);
4260
+ }
4261
+ }, []);
4257
4262
  return /* @__PURE__ */jsxs(Flex, {
4258
4263
  gap: 2,
4259
4264
  align: "center",
@@ -4429,7 +4434,7 @@ function CustomRule(_ref8) {
4429
4434
  interval,
4430
4435
  count: count || null,
4431
4436
  until: until ? until : null,
4432
- byweekday
4437
+ byweekday: frequency === RRule.WEEKLY || frequency === RRule.MONTHLY ? byweekday : null
4433
4438
  };
4434
4439
  const newRule = new RRule(newOptions);
4435
4440
  onClose();