diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index 377a49ad3..d3d382980 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -167,6 +167,7 @@ :timeSlotsForSelectedDate="timeSlotsForSelectedDate" :isSameDay="isSameDay" :selectedRouteCodeData="selectedRouteCodeData" + :isDatePickerDoneInitializing="isDatePickerDoneInitializing" @waitListRequested="handleWaitListRequested" /> @@ -135,7 +134,8 @@ export default { isSameDay: Boolean, displayWaitList: Boolean, selectedRouteCodeData: Object, - }, + isDatePickerDoneInitializing: Boolean, + }, data() { return { timeSlotModalListButton: timeSlotModalListButton, @@ -188,6 +188,9 @@ export default { this.updateDropoffAndTimeSlotAnswersFromSelectedRouteCodeData(newValue); }, timeSlotsForSelectedDate() { + if (!this.isDatePickerDoneInitializing) { + return; + } // needed otherwise it nulls these too early and prevents a previously selected time slot from auto-selecting this.selectedAnswerForDropOffOrInshop = null; this.selectedAnswerForTimeSlots = null; this.autoSelectTimeSlotIfOnlyOneIsAvailable(); @@ -391,7 +394,7 @@ export default { this.answersForDropOffQuestion[0].value !== PICK_A_TIME_BUTTON_VALUE ); }, - shouldDisplayTimeSlotQuestion() { + displayTimeSlotQuestion() { return ( this.selectedAnswerForDropOffOrInshop == PICK_A_TIME_BUTTON_VALUE || !this.isDropOffAppointmentAvailable