iptdevs-design-system 2.7.117 → 2.7.119

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.
@@ -3440,6 +3440,8 @@ class CalculateQuotesService {
3440
3440
  let isEndMonth = false;
3441
3441
  dateJs.setMilliseconds(dateJs.getMilliseconds() + (1000 * 3600 * 24));
3442
3442
  isEndMonth = this.monthsDays[dateJs.getMonth()] === dateJs.getDate();
3443
+ console.log('---- end of month ---');
3444
+ console.log(isEndMonth);
3443
3445
  if (dateJs.getDay() === 0) {
3444
3446
  Swal.fire({
3445
3447
  title: 'Fecha inválida',
@@ -3479,9 +3481,10 @@ class CalculateQuotesService {
3479
3481
  setPlusOneMonth(originDate, isEndMonth) {
3480
3482
  let response = [];
3481
3483
  let oneDayMilis = 1000 * 3600 * 24;
3482
- let day = isEndMonth || (originDate.getMonth() === 1 && originDate.getDate() > 28) ? this.monthsDays[originDate.getMonth()] : originDate.getDate();
3484
+ let day = isEndMonth || (originDate.getMonth() === 1 && originDate.getDate() > 28) ? this.monthsDays[originDate.getMonth() + 1] : originDate.getDate();
3483
3485
  let plusMonthDate = new Date(originDate.getFullYear(), originDate.getMonth() + 1, day);
3484
- response.push(plusMonthDate);
3486
+ let initialDate = new Date(originDate.getFullYear(), originDate.getMonth() + 1, day);
3487
+ response.push(initialDate);
3485
3488
  while (plusMonthDate.getDay() === 0) {
3486
3489
  plusMonthDate.setMilliseconds(originDate.getMilliseconds() - oneDayMilis);
3487
3490
  }