@para-ui/core 4.0.5 → 4.0.6
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/CycleSelector/index.js +10 -17
- package/README.md +3 -0
- package/package.json +1 -1
- package/umd/CycleSelector.js +1 -1
package/CycleSelector/index.js
CHANGED
|
@@ -256,7 +256,7 @@ const CycleSelector = props => {
|
|
|
256
256
|
constData.current.value = value;
|
|
257
257
|
useEffect(() => {
|
|
258
258
|
const arr = [];
|
|
259
|
-
for (let i = 1; i <
|
|
259
|
+
for (let i = 1; i < 32; i++) {
|
|
260
260
|
arr.push({
|
|
261
261
|
label: intl('every') + i,
|
|
262
262
|
value: i
|
|
@@ -331,10 +331,10 @@ const CycleSelector = props => {
|
|
|
331
331
|
label: intl('repeatEveryWeek') + ' ' + intl('week' + weekDay) + ' ' + hm,
|
|
332
332
|
value: 2
|
|
333
333
|
}, {
|
|
334
|
-
label: intl('repeatEveryMonth') + ' ' + day + intl('th'),
|
|
334
|
+
label: intl('repeatEveryMonth') + ' ' + day + intl('th') + ' ' + hm,
|
|
335
335
|
value: 3
|
|
336
336
|
}, {
|
|
337
|
-
label: intl('repeatEveryYear') + ' ' + month + intl('month') + day + intl('th'),
|
|
337
|
+
label: intl('repeatEveryYear') + ' ' + month + intl('month') + day + intl('th') + ' ' + hm,
|
|
338
338
|
value: 4
|
|
339
339
|
}, {
|
|
340
340
|
label: intl('customRepetition'),
|
|
@@ -435,7 +435,7 @@ const CycleSelector = props => {
|
|
|
435
435
|
onChange(cancel ? Object.assign({}, constData.current.value) : Object.assign({}, constData.current.valueCom));
|
|
436
436
|
};
|
|
437
437
|
const onVisibleChange = bol => {
|
|
438
|
-
if (!bol)
|
|
438
|
+
if (!bol) cancelPopover();
|
|
439
439
|
};
|
|
440
440
|
const clickBtn = () => {
|
|
441
441
|
setOpen(true);
|
|
@@ -722,21 +722,14 @@ const CycleSelector = props => {
|
|
|
722
722
|
return current && current < dayjs(new Date().getTime() - 24 * 60 * 60 * 1000);
|
|
723
723
|
};
|
|
724
724
|
};
|
|
725
|
-
const range = (start, end) => {
|
|
726
|
-
const result = [];
|
|
727
|
-
for (let i = start; i < end; i++) {
|
|
728
|
-
result.push(i);
|
|
729
|
-
}
|
|
730
|
-
return result;
|
|
731
|
-
};
|
|
732
725
|
const disabledTimeHand = () => {
|
|
733
726
|
if (disabledTime) return disabledTime;
|
|
734
|
-
return () => {
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}
|
|
727
|
+
/*return () => {
|
|
728
|
+
return {
|
|
729
|
+
disabledHours: () => range(0, 24).splice(0, new Date().getHours()),
|
|
730
|
+
disabledMinutes: () => range(0, new Date().getMinutes())
|
|
731
|
+
}
|
|
732
|
+
}*/
|
|
740
733
|
};
|
|
741
734
|
return jsxs("div", Object.assign({
|
|
742
735
|
className: clsx("".concat($prefixCls, "-cycle-selector"), className),
|
package/README.md
CHANGED