when resetting date picker, reset local flags
This commit is contained in:
parent
9de93b9c97
commit
70e927748d
1 changed files with 7 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue