diginet-core-ui 1.4.55-beta.8.2 → 1.4.55-beta.8.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.
|
@@ -224,6 +224,8 @@ const DateRangePicker = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, refe
|
|
|
224
224
|
const onDayClick = e => {
|
|
225
225
|
const el = e.currentTarget;
|
|
226
226
|
const v = parseInt(el.dataset.time, 10);
|
|
227
|
+
selectedPeriodRef.current = '';
|
|
228
|
+
focusBtnRef.current = '';
|
|
227
229
|
if (values.current.length === 0) {
|
|
228
230
|
//push
|
|
229
231
|
el.classList.add(unique.day.active);
|
|
@@ -564,6 +566,7 @@ const DateRangePicker = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, refe
|
|
|
564
566
|
onChangeValue(values.current);
|
|
565
567
|
}
|
|
566
568
|
closePicker();
|
|
569
|
+
setOpenState(false);
|
|
567
570
|
};
|
|
568
571
|
const onSwap = open => {
|
|
569
572
|
if (!isEnable) return;
|
|
@@ -836,8 +839,8 @@ const DateRangePicker = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, refe
|
|
|
836
839
|
const firstday = new Date(currentDay.setDate(first)).setHours(0, 0, 0);
|
|
837
840
|
const lastday = new Date(currentDay.setDate(last)).setHours(0, 0, 0);
|
|
838
841
|
value = [firstday.valueOf(), lastday.valueOf()];
|
|
839
|
-
valueFr.current = firstday;
|
|
840
|
-
valueTo.current = lastday;
|
|
842
|
+
valueFr.current = new Date(firstday);
|
|
843
|
+
valueTo.current = new Date(lastday);
|
|
841
844
|
break;
|
|
842
845
|
}
|
|
843
846
|
case 'thisMonth':
|
|
@@ -860,8 +863,8 @@ const DateRangePicker = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, refe
|
|
|
860
863
|
lastday = new Date(lastDayArray[2], lastDayArray[1], lastDayArray[0]);
|
|
861
864
|
}
|
|
862
865
|
value = [firstday.valueOf(), lastday.valueOf()];
|
|
863
|
-
valueFr.current = firstday;
|
|
864
|
-
valueTo.current = lastday;
|
|
866
|
+
valueFr.current = new Date(firstday);
|
|
867
|
+
valueTo.current = new Date(lastday);
|
|
865
868
|
selectedPeriodIndex.current = `period${periodData === null || periodData === void 0 ? void 0 : periodData.idx}`;
|
|
866
869
|
selectedPeriodRef.current = periodData === null || periodData === void 0 ? void 0 : periodData[periodOptions === null || periodOptions === void 0 ? void 0 : periodOptions.displayExpr];
|
|
867
870
|
document.getElementById(selectedPeriodIndex.current).style.background = getColor('fill/hover');
|