WIP Изменила отправку документов
This commit is contained in:
@@ -75,21 +75,20 @@ export default {
|
||||
return {
|
||||
calendarVisibility: false,
|
||||
internalDate: null,
|
||||
//internalValue: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
value: {
|
||||
get() {
|
||||
this.changeInternalDate(
|
||||
moment(this.convertFormat(this.modelValue)).isValid()
|
||||
? moment(this.convertFormat(this.modelValue))
|
||||
moment(this.checkFormat(this.modelValue)).isValid()
|
||||
? moment(this.modelValue)
|
||||
: null
|
||||
);
|
||||
return this.modelValue;
|
||||
return this.convertISOFormat(this.modelValue);
|
||||
},
|
||||
set(value) {
|
||||
this.$emit("update:modelValue", value);
|
||||
this.$emit("update:modelValue", this.convertRUFormat(value));
|
||||
},
|
||||
},
|
||||
sizeVariable() {
|
||||
@@ -138,13 +137,17 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
convertFormat(date) {
|
||||
return date && date?.length === 10
|
||||
? date.split(".").reverse().join("-")
|
||||
: null;
|
||||
convertISOFormat(date) {
|
||||
return date?.split("-")?.reverse()?.join(".");
|
||||
},
|
||||
convertRUFormat(date) {
|
||||
return date?.split(".")?.reverse()?.join("-");
|
||||
},
|
||||
checkFormat(date) {
|
||||
return date && date?.length === 10 ? date : null;
|
||||
},
|
||||
defaultRule(val) {
|
||||
return !val || moment(this.convertFormat(val)).isValid();
|
||||
return !val || moment(this.convertRUFormat(val)).isValid();
|
||||
},
|
||||
closeCalendar() {
|
||||
this.calendarVisibility = false;
|
||||
|
||||
Reference in New Issue
Block a user