Pre-select the modified appointment date when editing an existing appointment in the booking form.

This commit is contained in:
alext 2018-04-15 08:34:01 +02:00
parent 3432d4e9ea
commit c26b111ab2

View file

@ -242,7 +242,7 @@ window.FrontendBookApi = window.FrontendBookApi || {};
var selectedDate = Date.parse(selectedDateString); var selectedDate = Date.parse(selectedDateString);
var numberOfDays = new Date(selectedDate.getFullYear(), selectedDate.getMonth() + 1, 0).getDate(); var numberOfDays = new Date(selectedDate.getFullYear(), selectedDate.getMonth() + 1, 0).getDate();
if (setDate) { if (setDate && !GlobalVariables.manageMode) {
for (var i = 1; i <= numberOfDays; i++) { for (var i = 1; i <= numberOfDays; i++) {
var currentDate = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), i); var currentDate = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), i);
if (unavailableDates.indexOf(currentDate.toString('yyyy-MM-dd')) === -1) { if (unavailableDates.indexOf(currentDate.toString('yyyy-MM-dd')) === -1) {