@websy/websy-designs 1.2.15 → 1.2.17
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.
|
@@ -951,6 +951,7 @@ class WebsyDatePicker {
|
|
|
951
951
|
selectCustomRange (range) {
|
|
952
952
|
this.selectedRange = -1
|
|
953
953
|
this.selectedRangeDates = range
|
|
954
|
+
this.currentselection = []
|
|
954
955
|
// check if the custom range matches a configured range
|
|
955
956
|
for (let i = 0; i < this.options.ranges[this.options.mode].length; i++) {
|
|
956
957
|
if (this.options.ranges[this.options.mode][i].range.length === 1) {
|
|
@@ -1015,16 +1016,22 @@ class WebsyDatePicker {
|
|
|
1015
1016
|
})
|
|
1016
1017
|
let start = list[0]
|
|
1017
1018
|
let end = ''
|
|
1018
|
-
if (this.customRangeSelected === true) {
|
|
1019
|
+
if (this.customRangeSelected === true) {
|
|
1019
1020
|
end = ` - ${list[list.length - 1]}`
|
|
1021
|
+
if (this.options.mode === 'hour') {
|
|
1022
|
+
end = `${this.customRangeSelected === true ? ' - ' : ''}${this.options.hours[list[list.length - 1]].text}`
|
|
1023
|
+
}
|
|
1020
1024
|
}
|
|
1021
1025
|
else {
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1026
|
+
if (list.length > 1) {
|
|
1027
|
+
start = `${list.length} selected`
|
|
1028
|
+
}
|
|
1029
|
+
else {
|
|
1030
|
+
if (this.options.mode === 'hour') {
|
|
1031
|
+
start = this.options.hours[start].text
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1028
1035
|
range = { label: `${start}${end}` }
|
|
1029
1036
|
}
|
|
1030
1037
|
else {
|
|
@@ -1055,7 +1055,8 @@ var WebsyDatePicker = /*#__PURE__*/function () {
|
|
|
1055
1055
|
key: "selectCustomRange",
|
|
1056
1056
|
value: function selectCustomRange(range) {
|
|
1057
1057
|
this.selectedRange = -1;
|
|
1058
|
-
this.selectedRangeDates = range;
|
|
1058
|
+
this.selectedRangeDates = range;
|
|
1059
|
+
this.currentselection = []; // check if the custom range matches a configured range
|
|
1059
1060
|
|
|
1060
1061
|
for (var i = 0; i < this.options.ranges[this.options.mode].length; i++) {
|
|
1061
1062
|
if (this.options.ranges[this.options.mode][i].range.length === 1) {
|
|
@@ -1127,13 +1128,18 @@ var WebsyDatePicker = /*#__PURE__*/function () {
|
|
|
1127
1128
|
|
|
1128
1129
|
if (this.customRangeSelected === true) {
|
|
1129
1130
|
end = " - ".concat(list[list.length - 1]);
|
|
1130
|
-
} else {
|
|
1131
|
-
start = "".concat(list.length, " selected");
|
|
1132
|
-
}
|
|
1133
1131
|
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1132
|
+
if (this.options.mode === 'hour') {
|
|
1133
|
+
end = "".concat(this.customRangeSelected === true ? ' - ' : '').concat(this.options.hours[list[list.length - 1]].text);
|
|
1134
|
+
}
|
|
1135
|
+
} else {
|
|
1136
|
+
if (list.length > 1) {
|
|
1137
|
+
start = "".concat(list.length, " selected");
|
|
1138
|
+
} else {
|
|
1139
|
+
if (this.options.mode === 'hour') {
|
|
1140
|
+
start = this.options.hours[start].text;
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1137
1143
|
}
|
|
1138
1144
|
|
|
1139
1145
|
range = {
|