diff --git a/src/layouts/schedule-page/schedule-page.vue b/src/layouts/schedule-page/schedule-page.vue index b0e8e612..909ba2a9 100644 --- a/src/layouts/schedule-page/schedule-page.vue +++ b/src/layouts/schedule-page/schedule-page.vue @@ -461,7 +461,7 @@ export default { const initialEndDate = new Date(); initialEndDate.setDate(initialEndDate.getDate() + (initialDays - 1)); let initialViewEndDate = convertDateToDateString(initialEndDate); - const preSelectedDate = this.mainStore.order.schedule.date; + const preSelectedDate = this.selectedDate; const endDateObject = this.getEndDateForExistingDate( todayDateObject, @@ -609,12 +609,18 @@ export default { } }, async refreshDatePicker() { + this.resetLocalFlags(); await this.getDatePickerInitialData().then((data) => { this.selectableDatesData = data.initialShopTimeSlotsResponse; this.$refs.datePicker.initializeComponent(data); showIssLoadingModal(false); }); }, + resetLocalFlags() { + this.selectedDate = null; + this.selectedTimeSlotInfo = null; + this.showDatePickerError = false; + }, timeSlotSelectedFromPicker(timeSlot) { this.selectedTimeSlotInfo = timeSlot; this.showDatePickerError = false;