@websy/websy-designs 1.2.7 → 1.2.8

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.
@@ -695,12 +695,13 @@ class WebsyDatePicker {
695
695
  }
696
696
  if (this.monthYearMonths.indexOf(`${d.getMonth()}-${d.getFullYear()}`) === -1) {
697
697
  this.monthYearMonths.push(`${d.getMonth()}-${d.getFullYear()}`)
698
+ let firstOfMonth = new Date(new Date(d).setDate(1))
698
699
  this.monthYears[d.getFullYear()].push({
699
- date: new Date(d.setDate(1)),
700
+ date: firstOfMonth,
700
701
  month: this.options.monthMap[d.getMonth()],
701
702
  monthNum: d.getMonth(),
702
703
  year: d.getFullYear(),
703
- id: d.setDate(1)
704
+ id: firstOfMonth.getTime()
704
705
  })
705
706
  }
706
707
  if (disabled.indexOf(d.getTime()) === -1) {
@@ -776,12 +776,13 @@ var WebsyDatePicker = /*#__PURE__*/function () {
776
776
 
777
777
  if (this.monthYearMonths.indexOf("".concat(d.getMonth(), "-").concat(d.getFullYear())) === -1) {
778
778
  this.monthYearMonths.push("".concat(d.getMonth(), "-").concat(d.getFullYear()));
779
+ var firstOfMonth = new Date(new Date(d).setDate(1));
779
780
  this.monthYears[d.getFullYear()].push({
780
- date: new Date(d.setDate(1)),
781
+ date: firstOfMonth,
781
782
  month: this.options.monthMap[d.getMonth()],
782
783
  monthNum: d.getMonth(),
783
784
  year: d.getFullYear(),
784
- id: d.setDate(1)
785
+ id: firstOfMonth.getTime()
785
786
  });
786
787
  }
787
788