WIP Доделала модалку
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user