@lx-frontend/wrap-element-ui 1.0.19-beta.2 → 1.0.19-beta.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lx-frontend/wrap-element-ui",
3
- "version": "1.0.19-beta.2",
3
+ "version": "1.0.19-beta.4",
4
4
  "description": "wrap-element-ui",
5
5
  "author": "",
6
6
  "main": "src/components/index.ts",
@@ -7,7 +7,12 @@ export function genStartDateDisabledOptions(endDate: string, limit: number = 0)
7
7
  if (!endDate) return false;
8
8
 
9
9
  const currentDate = dayjs(time);
10
- return currentDate.isAfter(dayjs(endDate).add(limit, 'day'), 'day');
10
+ const baseOption = currentDate.isAfter(dayjs(endDate), 'day');
11
+
12
+ if (!limit) {
13
+ return baseOption
14
+ }
15
+ return baseOption || currentDate.isBefore(dayjs(endDate).subtract(limit, 'day'), 'day');
11
16
  }
12
17
  };
13
18
  }
@@ -19,7 +24,12 @@ export function genEndDateDisabledOptions(startDate: string, limit: number = 0)
19
24
  if (!startDate) return false;
20
25
 
21
26
  const currentDate = dayjs(time);
22
- return currentDate.isBefore(dayjs(startDate).subtract(limit, 'day'), 'day');
27
+ const baseOption = currentDate.isBefore(dayjs(startDate), 'day');
28
+
29
+ if (!limit) {
30
+ return baseOption
31
+ }
32
+ return baseOption || currentDate.isAfter(dayjs(startDate).add(limit, 'day'), 'day');
23
33
  }
24
34
  };
25
35
  }