@apexcura/ui-components 0.0.14-Beta288 → 0.0.14-Beta289
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 +8 -10
- package/dist/index.mjs +8 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -883,13 +883,12 @@ var DateRangePickerElement = (props) => {
|
|
|
883
883
|
const handleChange = (dates, dateStrings) => {
|
|
884
884
|
if (dates) {
|
|
885
885
|
let [start, end] = dates;
|
|
886
|
-
if (start && start.isBefore(today)) {
|
|
886
|
+
if (start && start.isBefore(today) && end && end.isAfter(today)) {
|
|
887
887
|
end = today;
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
start = temp;
|
|
888
|
+
}
|
|
889
|
+
if (end && end.isAfter(today) && start && start.isBefore(today)) {
|
|
891
890
|
start = today;
|
|
892
|
-
end =
|
|
891
|
+
end = end;
|
|
893
892
|
}
|
|
894
893
|
const adjustedDates = [start, end].map((date) => date ? date.format("DD-MM-YYYY") : null);
|
|
895
894
|
props.onChange && props.onChange(adjustedDates);
|
|
@@ -919,13 +918,12 @@ var DateRangePickerElement = (props) => {
|
|
|
919
918
|
const handleCalendarChange = (dates) => {
|
|
920
919
|
if (dates) {
|
|
921
920
|
let [start, end] = dates;
|
|
922
|
-
if (start && start.isBefore(today)) {
|
|
921
|
+
if (start && start.isBefore(today) && end && end.isAfter(today)) {
|
|
923
922
|
end = today;
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
start = temp;
|
|
923
|
+
}
|
|
924
|
+
if (end && end.isAfter(today) && start && start.isBefore(today)) {
|
|
927
925
|
start = today;
|
|
928
|
-
end =
|
|
926
|
+
end = end;
|
|
929
927
|
}
|
|
930
928
|
const adjustedDates = [start, end];
|
|
931
929
|
props.onChange && props.onChange(adjustedDates);
|
package/dist/index.mjs
CHANGED
|
@@ -816,13 +816,12 @@ var DateRangePickerElement = (props) => {
|
|
|
816
816
|
const handleChange = (dates, dateStrings) => {
|
|
817
817
|
if (dates) {
|
|
818
818
|
let [start, end] = dates;
|
|
819
|
-
if (start && start.isBefore(today)) {
|
|
819
|
+
if (start && start.isBefore(today) && end && end.isAfter(today)) {
|
|
820
820
|
end = today;
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
start = temp;
|
|
821
|
+
}
|
|
822
|
+
if (end && end.isAfter(today) && start && start.isBefore(today)) {
|
|
824
823
|
start = today;
|
|
825
|
-
end =
|
|
824
|
+
end = end;
|
|
826
825
|
}
|
|
827
826
|
const adjustedDates = [start, end].map((date) => date ? date.format("DD-MM-YYYY") : null);
|
|
828
827
|
props.onChange && props.onChange(adjustedDates);
|
|
@@ -852,13 +851,12 @@ var DateRangePickerElement = (props) => {
|
|
|
852
851
|
const handleCalendarChange = (dates) => {
|
|
853
852
|
if (dates) {
|
|
854
853
|
let [start, end] = dates;
|
|
855
|
-
if (start && start.isBefore(today)) {
|
|
854
|
+
if (start && start.isBefore(today) && end && end.isAfter(today)) {
|
|
856
855
|
end = today;
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
start = temp;
|
|
856
|
+
}
|
|
857
|
+
if (end && end.isAfter(today) && start && start.isBefore(today)) {
|
|
860
858
|
start = today;
|
|
861
|
-
end =
|
|
859
|
+
end = end;
|
|
862
860
|
}
|
|
863
861
|
const adjustedDates = [start, end];
|
|
864
862
|
props.onChange && props.onChange(adjustedDates);
|