@websy/websy-designs 1.2.21 → 1.2.23

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.
@@ -1139,11 +1139,11 @@ class WebsyDatePicker {
1139
1139
  let isContinuousRange = true
1140
1140
  if (rangeInput.length === 1) {
1141
1141
  this.selectedRangeDates = [...rangeInput]
1142
- this.customRangeSelected = [...rangeInput]
1142
+ this.customRangeSelected = true
1143
1143
  }
1144
1144
  else if (rangeInput.length === 2) {
1145
1145
  this.selectedRangeDates = [...rangeInput]
1146
- this.customRangeSelected = [...rangeInput]
1146
+ this.customRangeSelected = true
1147
1147
  }
1148
1148
  rangeInput.forEach((r, i) => {
1149
1149
  if (i > 0) {
@@ -1170,12 +1170,14 @@ class WebsyDatePicker {
1170
1170
  if (this.options.ranges[this.options.mode][i].range.length === 1) {
1171
1171
  if (this.options.ranges[this.options.mode][i].range[0] === rangeInput[0]) {
1172
1172
  this.selectedRange = i
1173
+ this.customRangeSelected = false
1173
1174
  break
1174
1175
  }
1175
1176
  }
1176
1177
  else if (this.options.ranges[this.options.mode][i].range.length === 2) {
1177
1178
  if (this.options.ranges[this.options.mode][i].range[0] === rangeInput[0] && this.options.ranges[this.options.mode][i].range[1] === rangeInput[1]) {
1178
1179
  this.selectedRange = i
1180
+ this.customRangeSelected = false
1179
1181
  break
1180
1182
  }
1181
1183
  }
@@ -3978,7 +3980,7 @@ const WebsyUtils = {
3978
3980
  }
3979
3981
  else if (backgroundColor.toLowerCase().indexOf('rgb') !== -1) {
3980
3982
  // rgb color
3981
- colorParts = backgroundColor
3983
+ colorParts = backgroundColor.replace(/rgb\(/gi, '').replace(/\)/gi, '')
3982
3984
  colorParts = colorParts.split(',')
3983
3985
  red = colorParts[0]
3984
3986
  green = colorParts[1]
@@ -1273,10 +1273,10 @@ var WebsyDatePicker = /*#__PURE__*/function () {
1273
1273
 
1274
1274
  if (rangeInput.length === 1) {
1275
1275
  this.selectedRangeDates = _toConsumableArray(rangeInput);
1276
- this.customRangeSelected = _toConsumableArray(rangeInput);
1276
+ this.customRangeSelected = true;
1277
1277
  } else if (rangeInput.length === 2) {
1278
1278
  this.selectedRangeDates = _toConsumableArray(rangeInput);
1279
- this.customRangeSelected = _toConsumableArray(rangeInput);
1279
+ this.customRangeSelected = true;
1280
1280
  }
1281
1281
 
1282
1282
  rangeInput.forEach(function (r, i) {
@@ -1306,11 +1306,13 @@ var WebsyDatePicker = /*#__PURE__*/function () {
1306
1306
  if (this.options.ranges[this.options.mode][i].range.length === 1) {
1307
1307
  if (this.options.ranges[this.options.mode][i].range[0] === rangeInput[0]) {
1308
1308
  this.selectedRange = i;
1309
+ this.customRangeSelected = false;
1309
1310
  break;
1310
1311
  }
1311
1312
  } else if (this.options.ranges[this.options.mode][i].range.length === 2) {
1312
1313
  if (this.options.ranges[this.options.mode][i].range[0] === rangeInput[0] && this.options.ranges[this.options.mode][i].range[1] === rangeInput[1]) {
1313
1314
  this.selectedRange = i;
1315
+ this.customRangeSelected = false;
1314
1316
  break;
1315
1317
  }
1316
1318
  }
@@ -4491,7 +4493,7 @@ var WebsyUtils = {
4491
4493
  blue = parseInt(colorParts[4] + colorParts[5], 16);
4492
4494
  } else if (backgroundColor.toLowerCase().indexOf('rgb') !== -1) {
4493
4495
  // rgb color
4494
- colorParts = backgroundColor;
4496
+ colorParts = backgroundColor.replace(/rgb\(/gi, '').replace(/\)/gi, '');
4495
4497
  colorParts = colorParts.split(',');
4496
4498
  red = colorParts[0];
4497
4499
  green = colorParts[1];