when resetting date picker, reset local flags

This commit is contained in:
Bill Richardson 2026-02-02 16:07:25 -05:00
parent 9de93b9c97
commit 70e927748d

View file

@ -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;