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')"
v-model="dateTo"
:min="dateFrom"
:state="stateDateTo"
@input="changeOption"
></b-form-datepicker>
</div>
@@ -131,13 +133,21 @@ export default {
},
},
series: [],
stateDateTo: null,
};
},
created() {},
mounted() {
this.getBodyHeight();
},
watch: {},
watch: {
dateFrom () {
this.validateDateTo();
},
dateTo () {
this.validateDateTo();
}
},
computed: {},
updated() {},
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>