@websy/websy-designs 1.2.30 → 1.2.32
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.
|
@@ -558,7 +558,7 @@ class WebsyDatePicker {
|
|
|
558
558
|
console.log('No element found with Id', elementId)
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
|
-
close (confirm) {
|
|
561
|
+
close (confirm, isRange = false) {
|
|
562
562
|
const maskEl = document.getElementById(`${this.elementId}_mask`)
|
|
563
563
|
const contentEl = document.getElementById(`${this.elementId}_content`)
|
|
564
564
|
const el = document.getElementById(this.elementId)
|
|
@@ -587,10 +587,14 @@ class WebsyDatePicker {
|
|
|
587
587
|
this.options.onChange(hoursOut, true)
|
|
588
588
|
}
|
|
589
589
|
else {
|
|
590
|
-
this.options.onChange(this.currentselection,
|
|
590
|
+
this.options.onChange(this.currentselection, isRange)
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
|
+
this.priorSelectedDates = [...this.selectedRangeDates]
|
|
595
|
+
this.priorSelectedRange = this.selectedRange
|
|
596
|
+
this.priorselection = [...this.currentselection]
|
|
597
|
+
this.priorCustomRangeSelected = this.customRangeSelected
|
|
594
598
|
this.updateRange()
|
|
595
599
|
}
|
|
596
600
|
else {
|
|
@@ -1133,7 +1137,7 @@ class WebsyDatePicker {
|
|
|
1133
1137
|
}
|
|
1134
1138
|
this.highlightRange()
|
|
1135
1139
|
this.updateRange()
|
|
1136
|
-
this.close(confirm)
|
|
1140
|
+
this.close(confirm, true)
|
|
1137
1141
|
}
|
|
1138
1142
|
}
|
|
1139
1143
|
selectCustomRange (rangeInput) {
|
package/dist/websy-designs.js
CHANGED
|
@@ -625,6 +625,7 @@ var WebsyDatePicker = /*#__PURE__*/function () {
|
|
|
625
625
|
value: function close(confirm) {
|
|
626
626
|
var _this4 = this;
|
|
627
627
|
|
|
628
|
+
var isRange = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
628
629
|
var maskEl = document.getElementById("".concat(this.elementId, "_mask"));
|
|
629
630
|
var contentEl = document.getElementById("".concat(this.elementId, "_content"));
|
|
630
631
|
var el = document.getElementById(this.elementId);
|
|
@@ -658,11 +659,15 @@ var WebsyDatePicker = /*#__PURE__*/function () {
|
|
|
658
659
|
|
|
659
660
|
this.options.onChange(_hoursOut, true);
|
|
660
661
|
} else {
|
|
661
|
-
this.options.onChange(this.currentselection,
|
|
662
|
+
this.options.onChange(this.currentselection, isRange);
|
|
662
663
|
}
|
|
663
664
|
}
|
|
664
665
|
}
|
|
665
666
|
|
|
667
|
+
this.priorSelectedDates = _toConsumableArray(this.selectedRangeDates);
|
|
668
|
+
this.priorSelectedRange = this.selectedRange;
|
|
669
|
+
this.priorselection = _toConsumableArray(this.currentselection);
|
|
670
|
+
this.priorCustomRangeSelected = this.customRangeSelected;
|
|
666
671
|
this.updateRange();
|
|
667
672
|
} else {
|
|
668
673
|
this.selectedRangeDates = _toConsumableArray(this.priorSelectedDates || []);
|
|
@@ -1264,7 +1269,7 @@ var WebsyDatePicker = /*#__PURE__*/function () {
|
|
|
1264
1269
|
|
|
1265
1270
|
this.highlightRange();
|
|
1266
1271
|
this.updateRange();
|
|
1267
|
-
this.close(confirm);
|
|
1272
|
+
this.close(confirm, true);
|
|
1268
1273
|
}
|
|
1269
1274
|
}
|
|
1270
1275
|
}, {
|