@lx-frontend/wrap-element-ui 1.0.19-beta.3 → 1.0.19-beta.5
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
|
@@ -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
|
-
|
|
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 - 1, '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
|
-
|
|
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 - 1, 'day'), 'day');
|
|
23
33
|
}
|
|
24
34
|
};
|
|
25
35
|
}
|