Error in conductor validation (#2293)

This commit is contained in:
Andrew Henry 2019-03-05 12:20:34 -08:00 committed by Deep Tailor
parent 322a7bd5a8
commit 5ee22b3481

View File

@ -366,8 +366,8 @@ export default {
}
},
setViewFromClock(clock) {
this.isFixed = clock === undefined;
this.clearAllValidation();
this.isFixed = clock === undefined;
},
setViewFromBounds(bounds) {
this.formattedBounds.start = this.timeFormatter.format(bounds.start);
@ -387,10 +387,15 @@ export default {
}
},
clearAllValidation() {
[this.$refs.startDate, this.$refs.endDate, this.$refs.startOffset, this.$refs.endOffset].forEach((input) => {
input.setCustomValidity('');
input.title = '';
});
if (this.isFixed) {
[this.$refs.startDate, this.$refs.endDate].forEach(this.clearValidationForInput);
} else {
[this.$refs.startOffset, this.$refs.endOffset].forEach(this.clearValidationForInput);
}
},
clearValidationForInput(input){
input.setCustomValidity('');
input.title = '';
},
validateAllBounds() {
return [this.$refs.startDate, this.$refs.endDate].every((input) => {