PMCORE-3359:TASKS > and fields are not validating correctly

This commit is contained in:
Fabio Guachalla
2021-09-21 16:40:49 -04:00
parent 2c87ee84d4
commit d6ed80c6cf

View File

@@ -32,6 +32,8 @@
}" }"
:placeholder="$t('ID_DELEGATE_DATE_TO')" :placeholder="$t('ID_DELEGATE_DATE_TO')"
v-model="dateTo" v-model="dateTo"
:min="dateFrom"
:state="stateDateTo"
@input="changeOption" @input="changeOption"
></b-form-datepicker> ></b-form-datepicker>
</div> </div>
@@ -131,13 +133,21 @@ export default {
}, },
}, },
series: [], series: [],
stateDateTo: null,
}; };
}, },
created() {}, created() {},
mounted() { mounted() {
this.getBodyHeight(); this.getBodyHeight();
}, },
watch: {}, watch: {
dateFrom () {
this.validateDateTo();
},
dateTo () {
this.validateDateTo();
}
},
computed: {}, computed: {},
updated() {}, updated() {},
beforeCreate() {}, beforeCreate() {},
@@ -199,6 +209,15 @@ export default {
}, },
]); ]);
}, },
validateDateTo() {
if (this.dateFrom !== '' && this.dateTo !== '') {
if (this.dateFrom > this.dateTo) {
this.stateDateTo = false;
} else {
this.stateDateTo = null;
}
}
},
}, },
}; };
</script> </script>