WIP Доделала модалку

This commit is contained in:
Daria Golova
2023-05-05 15:23:12 +03:00
parent 0345ddeee9
commit 05ce9f0125
7 changed files with 98 additions and 31 deletions

View File

@@ -13,7 +13,7 @@
:disable="disabled",
:filled="filled",
:bg-color="filled || standout ? '' : 'white'",
:rules="rule",
:rules="[checkTime]",
:lazy-rules="lazyRule",
:item-aligned="itemAligned",
:no-error-icon="noErrorIcon",
@@ -112,10 +112,20 @@ export default {
return this.modelValue ? this.modelValue : null;
},
set(value) {
this.$emit("update:modelValue", value);
this.$emit("update:modelValue", this.checkTime(value) ? value : null);
},
},
},
methods: {
checkTime(val) {
return (
!!val &&
val.length === 5 &&
val?.slice(0, 2) < 24 &&
val?.slice(-2) < 60
);
},
},
};
</script>