@websy/websy-designs 1.2.9 → 1.2.10

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.
@@ -537,12 +537,12 @@ class WebsyDatePicker {
537
537
  console.log('diff', diff)
538
538
  }
539
539
  else if (this.options.mode === 'hour') {
540
- this.options.hours.forEach(h => {
540
+ this.options.hours.forEach((h, i) => {
541
541
  if (h.text === this.selectedRangeDates[0]) {
542
- diffStart = h.num
542
+ diffStart = i
543
543
  }
544
544
  if (h.text === this.selectedRangeDates[this.selectedRangeDates.length - 1]) {
545
- diffEnd = h.num
545
+ diffEnd = i
546
546
  }
547
547
  })
548
548
  diff = diffEnd - diffStart
@@ -597,13 +597,13 @@ var WebsyDatePicker = /*#__PURE__*/function () {
597
597
  console.log('year diff', yearDiff);
598
598
  console.log('diff', diff);
599
599
  } else if (this.options.mode === 'hour') {
600
- this.options.hours.forEach(function (h) {
600
+ this.options.hours.forEach(function (h, i) {
601
601
  if (h.text === _this3.selectedRangeDates[0]) {
602
- diffStart = h.num;
602
+ diffStart = i;
603
603
  }
604
604
 
605
605
  if (h.text === _this3.selectedRangeDates[_this3.selectedRangeDates.length - 1]) {
606
- diffEnd = h.num;
606
+ diffEnd = i;
607
607
  }
608
608
  });
609
609
  diff = diffEnd - diffStart;