diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index 246ce2986..f08038f2b 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" />
@@ -133,6 +137,7 @@ export default { isSameDay: Boolean, displayWaitList: Boolean, selectedRouteCodeData: Object, + isDatePickerDoneInitializing: Boolean, }, data() { return { @@ -186,6 +191,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(); @@ -389,7 +397,7 @@ export default { this.answersForDropOffQuestion[0].value !== PICK_A_TIME_BUTTON_VALUE ); }, - shouldDisplayTimeSlotQuestion() { + displayTimeSlotQuestion() { return ( this.selectedAnswerForDropOffOrInshop == PICK_A_TIME_BUTTON_VALUE || !this.isDropOffAppointmentAvailable