@apexcura/ui-components 0.0.14-Beta291 → 0.0.14-Beta292
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 +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -874,6 +874,7 @@ 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"));
|
|
877
878
|
var DateRangePickerElement = (props) => {
|
|
878
879
|
const { value } = props;
|
|
879
880
|
const { RangePicker } = import_antd15.DatePicker;
|
|
@@ -899,9 +900,9 @@ var DateRangePickerElement = (props) => {
|
|
|
899
900
|
];
|
|
900
901
|
const disabledDate = (current) => {
|
|
901
902
|
if (props.weekrange) {
|
|
902
|
-
return current &&
|
|
903
|
+
return current && current < today.subtract(7, "d");
|
|
903
904
|
}
|
|
904
|
-
return current && current >
|
|
905
|
+
return current && current > (0, import_moment2.default)();
|
|
905
906
|
};
|
|
906
907
|
const handleCalendarChange = (dates) => {
|
|
907
908
|
if (dates) {
|
package/dist/index.mjs
CHANGED
|
@@ -807,6 +807,7 @@ 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";
|
|
810
811
|
var DateRangePickerElement = (props) => {
|
|
811
812
|
const { value } = props;
|
|
812
813
|
const { RangePicker } = DatePicker2;
|
|
@@ -832,9 +833,9 @@ var DateRangePickerElement = (props) => {
|
|
|
832
833
|
];
|
|
833
834
|
const disabledDate = (current) => {
|
|
834
835
|
if (props.weekrange) {
|
|
835
|
-
return current &&
|
|
836
|
+
return current && current < today.subtract(7, "d");
|
|
836
837
|
}
|
|
837
|
-
return current && current >
|
|
838
|
+
return current && current > moment2();
|
|
838
839
|
};
|
|
839
840
|
const handleCalendarChange = (dates) => {
|
|
840
841
|
if (dates) {
|