diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index 81d4315b6..c5c697d35 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -1217,6 +1217,8 @@ export default { async initializeDatePicker() { this.selectedDate = null; + const includeMobileTimeSlots = this.isServiceableMobile; + const includeInshopTimeSlots = this.isServiceableInshop || this.isServiceableDropoff; const datePickerInitialData = await this.$refs.datePicker.loadInitialData({ // setup config options for date-picker selectableDatesSetting: "custom", @@ -1225,8 +1227,8 @@ export default { preSelectedDate: this.preSelectedDate, providerNumber: this.selectedProvider?.providerNumber, zipCode: this.zipCode, - includeMobileTimeSlots: this.isServiceableMobile, - includeInshopTimeSlots: this.isServiceableInshop || this.isServiceableDropoff, + includeMobileTimeSlots: includeMobileTimeSlots, + includeInshopTimeSlots: includeInshopTimeSlots, }); datePickerInitialData.pricingByDayBasePrice = this.pricingByDayBasePrice; datePickerInitialData.pricingByDayUpcharge = this.pricingByDayUpcharge; @@ -1242,8 +1244,8 @@ export default { } else { // if no date is preselected on load, make sure there are some dates available if ( - this.selectableDatesInshop.days.length < 1 || - this.selectableDatesMobile.days.length < 1 + (includeInshopTimeSlots && this.selectableDatesInshop.days.length < 1) || + (includeMobileTimeSlots && this.selectableDatesMobile.days.length < 1) ) { await this.$nextTick(); await this.$refs.datePicker.showAnotherMonth();