lib-pajakio-v2 1.0.20 → 1.0.21
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/lib-pajakio-v2.common.js +92 -74
- package/dist/lib-pajakio-v2.common.js.map +1 -1
- package/dist/lib-pajakio-v2.umd.js +92 -74
- package/dist/lib-pajakio-v2.umd.js.map +1 -1
- package/dist/lib-pajakio-v2.umd.min.js +1 -1
- package/dist/lib-pajakio-v2.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DatePicker/index.vue +20 -1
package/package.json
CHANGED
|
@@ -841,6 +841,10 @@ export default {
|
|
|
841
841
|
}
|
|
842
842
|
},
|
|
843
843
|
selectValue(day) {
|
|
844
|
+
if (!day || day.disabled || (this.pickerType == "day" && !day.label)) {
|
|
845
|
+
return;
|
|
846
|
+
}
|
|
847
|
+
|
|
844
848
|
switch (this.mode) {
|
|
845
849
|
case "single":
|
|
846
850
|
this.dataSelected = day;
|
|
@@ -858,7 +862,12 @@ export default {
|
|
|
858
862
|
// Complete drag selection
|
|
859
863
|
} else {
|
|
860
864
|
this.selectEnd = day
|
|
861
|
-
|
|
865
|
+
// Ensure second click always becomes the range end (don't rely on hover state).
|
|
866
|
+
this.dragRange = {
|
|
867
|
+
...this.dragRange,
|
|
868
|
+
end: day.date,
|
|
869
|
+
};
|
|
870
|
+
const { start, end } = this.normalizeRange(this.dragRange);
|
|
862
871
|
// Clear drag selection
|
|
863
872
|
this.dragRange = null;
|
|
864
873
|
this.$emit("update:modelValue", { start: this.formatDateRange(start, "start"), end: this.formatDateRange(end, "end") });
|
|
@@ -1236,8 +1245,18 @@ export default {
|
|
|
1236
1245
|
} else {
|
|
1237
1246
|
if (this.clearAble) {
|
|
1238
1247
|
this.dataSelected = {};
|
|
1248
|
+
this.selectEnd = null;
|
|
1249
|
+
this.dragRange = null;
|
|
1239
1250
|
this.dataValue = null
|
|
1240
1251
|
this.month = this.todayComps.month
|
|
1252
|
+
this.year = this.todayComps.year
|
|
1253
|
+
if (this.mode == "range") {
|
|
1254
|
+
this.valueMonthStart = this.todayComps.month;
|
|
1255
|
+
this.valueYearStart = this.todayComps.year;
|
|
1256
|
+
const nextMonth = this.nextMonthComps();
|
|
1257
|
+
this.valueMonthEnd = nextMonth.month;
|
|
1258
|
+
this.valueYearEnd = nextMonth.year;
|
|
1259
|
+
}
|
|
1241
1260
|
this.$emit("update:modelValue", null);
|
|
1242
1261
|
}
|
|
1243
1262
|
}
|