CASH-845: add another nextTick and await to ensure date picker is ready for an auto select of first date

This commit is contained in:
AdamCaouetteSafelite 2025-07-18 15:39:52 -04:00
parent f18431a1d5
commit b7bf5c9690

View file

@ -1151,7 +1151,7 @@ export default {
});
datePickerInitialData.pricingByDayBasePrice = this.pricingByDayBasePrice;
datePickerInitialData.pricingByDayUpcharge = this.pricingByDayUpcharge;
this.$refs.datePicker.initializeComponent(datePickerInitialData);
await this.$refs.datePicker.initializeComponent(datePickerInitialData);
this.selectableDatesInshop =
datePickerInitialData.initialShopTimeSlotsResponse.inshopTimeSlotsData;
this.selectableDatesMobile =
@ -1182,11 +1182,13 @@ export default {
});
});
}
if (this.isMobileSelected) {
this.selectedDate = selectedDateMobile;
} else {
this.selectedDate = selectedDateInshop;
}
this.$nextTick(() => {
if (this.isMobileSelected) {
this.selectedDate = selectedDateMobile;
} else {
this.selectedDate = selectedDateInshop;
}
});
}
},
getScheduleApiResponse,