From 469247bf73c94458ef730d68b6f13fff961bd253 Mon Sep 17 00:00:00 2001 From: Pranav Nachanekar Date: Thu, 12 Sep 2019 11:15:42 +0530 Subject: [PATCH] Change max date of datepicker to number of days in future as specified by the settings --- .../appointment_booking_settings.json | 2 +- erpnext/www/book-appointment/index.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.json b/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.json index 2386ed76e9..6ef00703d1 100644 --- a/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.json +++ b/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.json @@ -57,7 +57,7 @@ } ], "issingle": 1, - "modified": "2019-09-12 10:47:20.274330", + "modified": "2019-09-12 10:52:25.931931", "modified_by": "Administrator", "module": "CRM", "name": "Appointment Booking Settings", diff --git a/erpnext/www/book-appointment/index.js b/erpnext/www/book-appointment/index.js index f9d9b6e845..96ad66ace3 100644 --- a/erpnext/www/book-appointment/index.js +++ b/erpnext/www/book-appointment/index.js @@ -43,7 +43,8 @@ function setup_date_picker() { let date_picker = document.getElementById('appointment-date'); let today = new Date(); date_picker.min = today.toISOString().substr(0, 10); - date_picker.max = window.holiday_list.to_date; + today.setDate(today.getDate() + window.appointment_settings.advance_booking_days); + date_picker.max = today.toISOString().substr(0,10); } function hide_next_button(){