mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 10:02:33 +03:00
Correct datepicker navigation issue in booking page
This commit is contained in:
parent
122759b531
commit
7f534e51c7
1 changed files with 22 additions and 14 deletions
|
@ -87,20 +87,28 @@ App.Pages.Booking = (function () {
|
||||||
updateConfirmFrame();
|
updateConfirmFrame();
|
||||||
},
|
},
|
||||||
|
|
||||||
onMonthChange: (selectedDates) => {
|
onMonthChange: () => {
|
||||||
App.Http.Booking.getUnavailableDates(
|
setTimeout(() => {
|
||||||
$selectProvider.val(),
|
const displayedMonthMoment = moment(instance.currentYearElement.value + '-' + (Number(instance.monthsDropdownContainer.value) + 1) + '-01');
|
||||||
$selectService.val(),
|
|
||||||
moment(selectedDates[0]).format('YYYY-MM-DD')
|
App.Http.Booking.getUnavailableDates(
|
||||||
);
|
$selectProvider.val(),
|
||||||
|
$selectService.val(),
|
||||||
|
displayedMonthMoment.format('YYYY-MM-DD')
|
||||||
|
);
|
||||||
|
}, 500);
|
||||||
},
|
},
|
||||||
|
|
||||||
onYearChange: (selectedDates) => {
|
onYearChange: () => {
|
||||||
App.Http.Booking.getUnavailableDates(
|
setTimeout(() => {
|
||||||
$selectProvider.val(),
|
const displayedMonthMoment = moment(instance.currentYearElement.value + '-' + (Number(instance.monthsDropdownContainer.value) + 1) + '-01');
|
||||||
$selectService.val(),
|
|
||||||
moment(selectedDates[0]).format('YYYY-MM-DD')
|
App.Http.Booking.getUnavailableDates(
|
||||||
);
|
$selectProvider.val(),
|
||||||
|
$selectService.val(),
|
||||||
|
displayedMonthMoment.format('YYYY-MM-DD')
|
||||||
|
);
|
||||||
|
}, 500);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -733,7 +741,7 @@ App.Pages.Booking = (function () {
|
||||||
|
|
||||||
// Set Appointment Date
|
// Set Appointment Date
|
||||||
const startMoment = moment(appointment.start_datetime);
|
const startMoment = moment(appointment.start_datetime);
|
||||||
$selectDate[0]._flatpickr.setDate( startMoment.toDate());
|
$selectDate[0]._flatpickr.setDate(startMoment.toDate());
|
||||||
App.Http.Booking.getAvailableHours(startMoment.format('YYYY-MM-DD'));
|
App.Http.Booking.getAvailableHours(startMoment.format('YYYY-MM-DD'));
|
||||||
|
|
||||||
// Apply Customer's Data
|
// Apply Customer's Data
|
||||||
|
|
Loading…
Reference in a new issue