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:
parent
f18431a1d5
commit
b7bf5c9690
1 changed files with 8 additions and 6 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue