diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index e20c025fb..adc85ef2a 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -28,7 +28,6 @@ cmsWidgetName="ScheduleYourServiceWidget" id="schedule-your-service" /> 0; } else { return this.selectableDatesInshop?.days?.length > 0; @@ -1842,10 +1840,13 @@ export default { } else { this.appointmentType = null; } - this.setSelectedDateToFirstAvailable(); // v-if on appointmentTypeQuestion ensures dates have been loaded by now + this.setSelectedDateToFirstAvailable(); }, setSelectedDateToFirstAvailable() { - this.selectedDate = this.getFirstAvailableDate(); + if (this.hasSelectableDatesLoaded) { + // ensure dates have been loaded by now + this.selectedDate = this.getFirstAvailableDate(); + } }, showRecalAcknowledgementModal() { if (this.shouldShowRecalAckModal()) { @@ -2069,7 +2070,7 @@ export default { watch: { appointmentTypeFromAppointmentTypeQuestion: { handler(newValue, oldValue) { - this.handleAppointmentTypeChange(newValue); // v-if on appointmentTypeQuestion ensures dates have been loaded by now + this.handleAppointmentTypeChange(newValue); }, }, },