@pisell/date-picker 1.0.86 → 1.0.87
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.
|
@@ -153,6 +153,14 @@ var PisellDateRangePicker = function PisellDateRangePicker(props) {
|
|
|
153
153
|
} else {
|
|
154
154
|
setCurrentShortcut(null);
|
|
155
155
|
}
|
|
156
|
+
if (!clearEndOnSelection && type !== "shortcuts" && type !== "write") {
|
|
157
|
+
if (rangePosition === 'start') {
|
|
158
|
+
newVal = [newVal[0], newVal[0]];
|
|
159
|
+
}
|
|
160
|
+
if (!newVal[1]) {
|
|
161
|
+
newVal = [newVal[0], newVal[0]];
|
|
162
|
+
}
|
|
163
|
+
}
|
|
156
164
|
if (isArr(showTime) && type !== "time") {
|
|
157
165
|
newVal = newVal.map(function (item, index) {
|
|
158
166
|
var _showTime$index;
|
|
@@ -163,14 +171,6 @@ var PisellDateRangePicker = function PisellDateRangePicker(props) {
|
|
|
163
171
|
return item || null;
|
|
164
172
|
});
|
|
165
173
|
}
|
|
166
|
-
if (!clearEndOnSelection && type !== "shortcuts" && type !== "write") {
|
|
167
|
-
if (rangePosition === 'start') {
|
|
168
|
-
newVal = [newVal[0], newVal[0]];
|
|
169
|
-
}
|
|
170
|
-
if (!newVal[1]) {
|
|
171
|
-
newVal = [newVal[0], newVal[0]];
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
174
|
if (clearEndOnSelection && type !== "set" && _value.filter(Boolean).length === 2) {
|
|
175
175
|
newVal = [newVal[0], null];
|
|
176
176
|
}
|
|
@@ -156,6 +156,14 @@ var PisellDateRangePicker = (props) => {
|
|
|
156
156
|
} else {
|
|
157
157
|
setCurrentShortcut(null);
|
|
158
158
|
}
|
|
159
|
+
if (!clearEndOnSelection && type !== "shortcuts" && type !== "write") {
|
|
160
|
+
if (rangePosition === "start") {
|
|
161
|
+
newVal = [newVal[0], newVal[0]];
|
|
162
|
+
}
|
|
163
|
+
if (!newVal[1]) {
|
|
164
|
+
newVal = [newVal[0], newVal[0]];
|
|
165
|
+
}
|
|
166
|
+
}
|
|
159
167
|
if ((0, import_utils.isArr)(showTime) && type !== "time") {
|
|
160
168
|
newVal = newVal.map((item, index) => {
|
|
161
169
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -165,14 +173,6 @@ var PisellDateRangePicker = (props) => {
|
|
|
165
173
|
return item || null;
|
|
166
174
|
});
|
|
167
175
|
}
|
|
168
|
-
if (!clearEndOnSelection && type !== "shortcuts" && type !== "write") {
|
|
169
|
-
if (rangePosition === "start") {
|
|
170
|
-
newVal = [newVal[0], newVal[0]];
|
|
171
|
-
}
|
|
172
|
-
if (!newVal[1]) {
|
|
173
|
-
newVal = [newVal[0], newVal[0]];
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
176
|
if (clearEndOnSelection && type !== "set" && _value.filter(Boolean).length === 2) {
|
|
177
177
|
newVal = [newVal[0], null];
|
|
178
178
|
}
|