@websy/websy-designs 1.2.14 → 1.2.15

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.
@@ -381,9 +381,7 @@ class WebsyDatePicker {
381
381
  maskEl.classList.remove('active')
382
382
  contentEl.classList.remove('active')
383
383
  if (confirm === true) {
384
- if (this.options.onChange) {
385
- console.log('confirm', this.selectedRangeDates)
386
- console.log('confirm', this.currentselection)
384
+ if (this.options.onChange) {
387
385
  if (this.customRangeSelected === true) {
388
386
  if (this.options.mode === 'hour') {
389
387
  let hoursOut = []
@@ -534,9 +532,7 @@ class WebsyDatePicker {
534
532
  }
535
533
  else if (this.options.mode === 'monthyear') {
536
534
  let yearDiff = (this.selectedRangeDates[this.selectedRangeDates.length - 1].getFullYear() - this.selectedRangeDates[0].getFullYear()) * 12
537
- diff = Math.floor((this.selectedRangeDates[this.selectedRangeDates.length - 1].getMonth() - this.selectedRangeDates[0].getMonth())) + yearDiff
538
- console.log('year diff', yearDiff)
539
- console.log('diff', diff)
535
+ diff = Math.floor((this.selectedRangeDates[this.selectedRangeDates.length - 1].getMonth() - this.selectedRangeDates[0].getMonth())) + yearDiff
540
536
  }
541
537
  else if (this.options.mode === 'hour') {
542
538
  diff = this.selectedRangeDates[this.selectedRangeDates.length - 1] - this.selectedRangeDates[0]
@@ -573,10 +569,7 @@ class WebsyDatePicker {
573
569
  else if (this.options.mode === 'year') {
574
570
  dateEl = document.getElementById(`${this.elementId}_${d}_year`)
575
571
  }
576
- else if (this.options.mode === 'monthyear') {
577
- console.log('d', d)
578
- console.log(this.selectedRangeDates)
579
- console.log(rangeStart, rangeEnd)
572
+ else if (this.options.mode === 'monthyear') {
580
573
  dateEl = document.getElementById(`${this.elementId}_${d}_monthyear`)
581
574
  }
582
575
  else if (this.options.mode === 'hour') {
@@ -905,8 +898,7 @@ class WebsyDatePicker {
905
898
  else {
906
899
  this.currentselection.splice(0, 0, timestamp)
907
900
  }
908
- this.customRangeSelected = true
909
- console.log('current selection', this.currentselection)
901
+ this.customRangeSelected = true
910
902
  }
911
903
  else {
912
904
  let index = this.currentselection.indexOf(timestamp)
@@ -921,8 +913,7 @@ class WebsyDatePicker {
921
913
  }
922
914
  }
923
915
  if (this.options.mode === 'date' || this.options.mode === 'monthyear') {
924
- this.selectedRangeDates = [new Date(this.currentselection[0]), new Date(this.currentselection[1] || this.currentselection[0])]
925
- console.log('selected range', this.selectedRangeDates)
916
+ this.selectedRangeDates = [new Date(this.currentselection[0]), new Date(this.currentselection[1] || this.currentselection[0])]
926
917
  }
927
918
  else if (this.options.mode === 'year') {
928
919
  this.selectedRangeDates = [this.currentselection[0], this.currentselection[1] || this.currentselection[0]]
@@ -423,9 +423,6 @@ var WebsyDatePicker = /*#__PURE__*/function () {
423
423
 
424
424
  if (confirm === true) {
425
425
  if (this.options.onChange) {
426
- console.log('confirm', this.selectedRangeDates);
427
- console.log('confirm', this.currentselection);
428
-
429
426
  if (this.customRangeSelected === true) {
430
427
  if (this.options.mode === 'hour') {
431
428
  var hoursOut = [];
@@ -598,8 +595,6 @@ var WebsyDatePicker = /*#__PURE__*/function () {
598
595
  } else if (this.options.mode === 'monthyear') {
599
596
  var yearDiff = (this.selectedRangeDates[this.selectedRangeDates.length - 1].getFullYear() - this.selectedRangeDates[0].getFullYear()) * 12;
600
597
  diff = Math.floor(this.selectedRangeDates[this.selectedRangeDates.length - 1].getMonth() - this.selectedRangeDates[0].getMonth()) + yearDiff;
601
- console.log('year diff', yearDiff);
602
- console.log('diff', diff);
603
598
  } else if (this.options.mode === 'hour') {
604
599
  diff = this.selectedRangeDates[this.selectedRangeDates.length - 1] - this.selectedRangeDates[0];
605
600
  }
@@ -635,9 +630,6 @@ var WebsyDatePicker = /*#__PURE__*/function () {
635
630
  } else if (this.options.mode === 'year') {
636
631
  dateEl = document.getElementById("".concat(this.elementId, "_").concat(d, "_year"));
637
632
  } else if (this.options.mode === 'monthyear') {
638
- console.log('d', d);
639
- console.log(this.selectedRangeDates);
640
- console.log(rangeStart, rangeEnd);
641
633
  dateEl = document.getElementById("".concat(this.elementId, "_").concat(d, "_monthyear"));
642
634
  } else if (this.options.mode === 'hour') {
643
635
  dateEl = document.getElementById("".concat(this.elementId, "_").concat(d, "_hour"));
@@ -1005,7 +997,6 @@ var WebsyDatePicker = /*#__PURE__*/function () {
1005
997
  }
1006
998
 
1007
999
  this.customRangeSelected = true;
1008
- console.log('current selection', this.currentselection);
1009
1000
  } else {
1010
1001
  var index = this.currentselection.indexOf(timestamp);
1011
1002
 
@@ -1024,7 +1015,6 @@ var WebsyDatePicker = /*#__PURE__*/function () {
1024
1015
 
1025
1016
  if (this.options.mode === 'date' || this.options.mode === 'monthyear') {
1026
1017
  this.selectedRangeDates = [new Date(this.currentselection[0]), new Date(this.currentselection[1] || this.currentselection[0])];
1027
- console.log('selected range', this.selectedRangeDates);
1028
1018
  } else if (this.options.mode === 'year') {
1029
1019
  this.selectedRangeDates = [this.currentselection[0], this.currentselection[1] || this.currentselection[0]];
1030
1020
  } else if (this.options.mode === 'monthyear') {//