Change max date of datepicker

to number of days in future as specified by the settings
This commit is contained in:
Pranav Nachanekar
2019-09-12 11:15:42 +05:30
parent a2dbd391b3
commit 469247bf73
2 changed files with 3 additions and 2 deletions

View File

@@ -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(){