WIP Начала делать выборку года

This commit is contained in:
Daria Golova
2023-06-19 18:01:54 +03:00
parent 93701c19bf
commit 7fbf5c4189
6 changed files with 241 additions and 89 deletions

View File

@@ -69,7 +69,7 @@
<script>
import BaseInput from "@/components/base/BaseInput";
import BaseCalendar from "@/components/base/BaseCalendar";
import BaseCalendar from "@/components/base/Calendar/BaseCalendar.vue";
import { mapState, mapActions } from "vuex";
import { v_model } from "@/shared/mixins/v-model";
export default {
@@ -119,23 +119,21 @@ export default {
}),
saveNewDate() {
this.calendarVisibility = false;
if (
!this.date?.from.isSame(this.selectedDates?.from) &&
!this.date?.to.isSame(this.selectedDates?.to)
)
this.changeSelectedDates(this.date);
},
cancelDateChanges() {
this.calendarVisibility = false;
},
},
watch: {
calendarVisibility(val) {
if (val === false)
this.date = {
from: this.selectedDates.from.clone(),
to: this.selectedDates.to.clone(),
};
date: {
deep: true,
handler(val) {
if (
!this.val?.from.isSame(this.selectedDates?.from) &&
!this.val?.to.isSame(this.selectedDates?.to)
)
this.changeSelectedDates(val);
},
},
},
mounted() {