@recras/online-booking-js 2.0.4 → 2.0.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recras/online-booking-js",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "JS library for easy integration of Recras online booking and voucher sales",
5
5
  "main": "dist/onlinebooking.js",
6
6
  "scripts": {
package/src/booking.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*******************************
2
2
  * Recras integration library *
3
- * v 2.0.4 *
3
+ * v 2.0.6 *
4
4
  *******************************/
5
5
 
6
6
  class RecrasBooking {
@@ -1183,7 +1183,8 @@ class RecrasBooking {
1183
1183
 
1184
1184
  let newEndDate = RecrasDateHelper.clone(lastAvailableDay);
1185
1185
  newEndDate.setFullYear(lastMonthYear.year);
1186
- newEndDate.setMonth(lastMonthYear.month + 2);
1186
+ newEndDate.setMonth(lastMonthYear.month + 3);
1187
+ newEndDate.setDate(0); // Set to 0th day of the month = last day of previous month
1187
1188
 
1188
1189
  this.getAvailableDays(packageId, lastAvailableDay, newEndDate);
1189
1190
  }
@@ -1556,7 +1557,8 @@ ${ msgs[1] }</p></div>`);
1556
1557
  thisClass.loadingIndicatorShow(thisClass.findElement('label[for="recras-onlinebooking-date"]'));
1557
1558
  let startDate = new Date();
1558
1559
  let endDate = new Date();
1559
- endDate.setMonth(endDate.getMonth() + 3);
1560
+ endDate.setMonth(endDate.getMonth() + 4);
1561
+ endDate.setDate(0); // Set to 0th day of the month = last day of previous month
1560
1562
 
1561
1563
  if (!thisClass.prefilledDate) {
1562
1564
  thisClass.getAvailableDaysInPeriod(thisClass.selectedPackage.id, startDate, endDate);
@@ -344,7 +344,7 @@ class RecrasContactForm {
344
344
  return label + `<input type="number" ${ fixedAttributes } min="1">`;
345
345
  case 'boeking.starttijd':
346
346
  placeholder = this.languageHelper.translate('TIME_FORMAT');
347
- return label + `<input type="time" ${ fixedAttributes } placeholder="${ placeholder }" pattern="${ timePattern }" step="300">`;
347
+ return label + `<input type="time" ${ fixedAttributes } placeholder="${ placeholder }" pattern="${ timePattern }">`;
348
348
  case 'boeking.arrangement':
349
349
  const preFilledPackage = this.options.getPackageId();
350
350
  if (field.verplicht && this.packages.length === 1) {