@apexcura/ui-components 0.0.14-Beta290 → 0.0.14-Beta291
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/dist/index.js +6 -13
- package/dist/index.mjs +6 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -874,7 +874,6 @@ var DatePickerElement = (props) => {
|
|
|
874
874
|
var import_react21 = __toESM(require("react"));
|
|
875
875
|
var import_antd15 = require("antd");
|
|
876
876
|
var import_dayjs2 = __toESM(require("dayjs"));
|
|
877
|
-
var import_moment2 = __toESM(require("moment"));
|
|
878
877
|
var DateRangePickerElement = (props) => {
|
|
879
878
|
const { value } = props;
|
|
880
879
|
const { RangePicker } = import_antd15.DatePicker;
|
|
@@ -898,18 +897,12 @@ var DateRangePickerElement = (props) => {
|
|
|
898
897
|
{ label: "Last 30 Days", value: [(0, import_dayjs2.default)().subtract(29, "d"), today] },
|
|
899
898
|
{ label: "Last 90 Days", value: [(0, import_dayjs2.default)().subtract(89, "d"), today] }
|
|
900
899
|
];
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
disabledDate = (current2) => {
|
|
908
|
-
return current2 && current2 > (0, import_moment2.default)();
|
|
909
|
-
};
|
|
910
|
-
}
|
|
911
|
-
};
|
|
912
|
-
}
|
|
900
|
+
const disabledDate = (current) => {
|
|
901
|
+
if (props.weekrange) {
|
|
902
|
+
return current && (current < today.subtract(7, "d") || current > today.add(7, "d"));
|
|
903
|
+
}
|
|
904
|
+
return current && current > today;
|
|
905
|
+
};
|
|
913
906
|
const handleCalendarChange = (dates) => {
|
|
914
907
|
if (dates) {
|
|
915
908
|
let [start, end] = dates;
|
package/dist/index.mjs
CHANGED
|
@@ -807,7 +807,6 @@ var DatePickerElement = (props) => {
|
|
|
807
807
|
import React21 from "react";
|
|
808
808
|
import { DatePicker as DatePicker2, Space } from "antd";
|
|
809
809
|
import dayjs2 from "dayjs";
|
|
810
|
-
import moment2 from "moment";
|
|
811
810
|
var DateRangePickerElement = (props) => {
|
|
812
811
|
const { value } = props;
|
|
813
812
|
const { RangePicker } = DatePicker2;
|
|
@@ -831,18 +830,12 @@ var DateRangePickerElement = (props) => {
|
|
|
831
830
|
{ label: "Last 30 Days", value: [dayjs2().subtract(29, "d"), today] },
|
|
832
831
|
{ label: "Last 90 Days", value: [dayjs2().subtract(89, "d"), today] }
|
|
833
832
|
];
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
disabledDate = (current2) => {
|
|
841
|
-
return current2 && current2 > moment2();
|
|
842
|
-
};
|
|
843
|
-
}
|
|
844
|
-
};
|
|
845
|
-
}
|
|
833
|
+
const disabledDate = (current) => {
|
|
834
|
+
if (props.weekrange) {
|
|
835
|
+
return current && (current < today.subtract(7, "d") || current > today.add(7, "d"));
|
|
836
|
+
}
|
|
837
|
+
return current && current > today;
|
|
838
|
+
};
|
|
846
839
|
const handleCalendarChange = (dates) => {
|
|
847
840
|
if (dates) {
|
|
848
841
|
let [start, end] = dates;
|