@apexcura/ui-components 0.0.14-Beta289 → 0.0.14-Beta290
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 +4 -13
- package/dist/index.mjs +4 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -886,10 +886,6 @@ var DateRangePickerElement = (props) => {
|
|
|
886
886
|
if (start && start.isBefore(today) && end && end.isAfter(today)) {
|
|
887
887
|
end = today;
|
|
888
888
|
}
|
|
889
|
-
if (end && end.isAfter(today) && start && start.isBefore(today)) {
|
|
890
|
-
start = today;
|
|
891
|
-
end = end;
|
|
892
|
-
}
|
|
893
889
|
const adjustedDates = [start, end].map((date) => date ? date.format("DD-MM-YYYY") : null);
|
|
894
890
|
props.onChange && props.onChange(adjustedDates);
|
|
895
891
|
} else {
|
|
@@ -907,12 +903,11 @@ var DateRangePickerElement = (props) => {
|
|
|
907
903
|
disabledDate = (current) => {
|
|
908
904
|
if (props.weekrange) {
|
|
909
905
|
return current && (current < today.subtract(7, "d") || current > today.add(7, "d"));
|
|
906
|
+
} else {
|
|
907
|
+
disabledDate = (current2) => {
|
|
908
|
+
return current2 && current2 > (0, import_moment2.default)();
|
|
909
|
+
};
|
|
910
910
|
}
|
|
911
|
-
return current && (current > today.add(7, "d") || current < today.subtract(7, "d"));
|
|
912
|
-
};
|
|
913
|
-
} else {
|
|
914
|
-
disabledDate = (current) => {
|
|
915
|
-
return current && current > (0, import_moment2.default)();
|
|
916
911
|
};
|
|
917
912
|
}
|
|
918
913
|
const handleCalendarChange = (dates) => {
|
|
@@ -921,10 +916,6 @@ var DateRangePickerElement = (props) => {
|
|
|
921
916
|
if (start && start.isBefore(today) && end && end.isAfter(today)) {
|
|
922
917
|
end = today;
|
|
923
918
|
}
|
|
924
|
-
if (end && end.isAfter(today) && start && start.isBefore(today)) {
|
|
925
|
-
start = today;
|
|
926
|
-
end = end;
|
|
927
|
-
}
|
|
928
919
|
const adjustedDates = [start, end];
|
|
929
920
|
props.onChange && props.onChange(adjustedDates);
|
|
930
921
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -819,10 +819,6 @@ var DateRangePickerElement = (props) => {
|
|
|
819
819
|
if (start && start.isBefore(today) && end && end.isAfter(today)) {
|
|
820
820
|
end = today;
|
|
821
821
|
}
|
|
822
|
-
if (end && end.isAfter(today) && start && start.isBefore(today)) {
|
|
823
|
-
start = today;
|
|
824
|
-
end = end;
|
|
825
|
-
}
|
|
826
822
|
const adjustedDates = [start, end].map((date) => date ? date.format("DD-MM-YYYY") : null);
|
|
827
823
|
props.onChange && props.onChange(adjustedDates);
|
|
828
824
|
} else {
|
|
@@ -840,12 +836,11 @@ var DateRangePickerElement = (props) => {
|
|
|
840
836
|
disabledDate = (current) => {
|
|
841
837
|
if (props.weekrange) {
|
|
842
838
|
return current && (current < today.subtract(7, "d") || current > today.add(7, "d"));
|
|
839
|
+
} else {
|
|
840
|
+
disabledDate = (current2) => {
|
|
841
|
+
return current2 && current2 > moment2();
|
|
842
|
+
};
|
|
843
843
|
}
|
|
844
|
-
return current && (current > today.add(7, "d") || current < today.subtract(7, "d"));
|
|
845
|
-
};
|
|
846
|
-
} else {
|
|
847
|
-
disabledDate = (current) => {
|
|
848
|
-
return current && current > moment2();
|
|
849
844
|
};
|
|
850
845
|
}
|
|
851
846
|
const handleCalendarChange = (dates) => {
|
|
@@ -854,10 +849,6 @@ var DateRangePickerElement = (props) => {
|
|
|
854
849
|
if (start && start.isBefore(today) && end && end.isAfter(today)) {
|
|
855
850
|
end = today;
|
|
856
851
|
}
|
|
857
|
-
if (end && end.isAfter(today) && start && start.isBefore(today)) {
|
|
858
|
-
start = today;
|
|
859
|
-
end = end;
|
|
860
|
-
}
|
|
861
852
|
const adjustedDates = [start, end];
|
|
862
853
|
props.onChange && props.onChange(adjustedDates);
|
|
863
854
|
}
|