Default showPopError to false when there are no initial PoP dates

This commit is contained in:
leigh-mil 2019-08-02 14:20:32 -04:00
parent e1fbac5a52
commit 5a664c5a83

View File

@ -44,6 +44,7 @@ export default {
const start = new Date(this.initialStartDate)
const end = new Date(this.initialEndDate)
const popValidation = !this.initialStartDate ? false : start < end
const showPopValidation = !this.initialStartDate ? false : !popValidation
return {
clinIndex: this.initialClinIndex,
@ -54,7 +55,7 @@ export default {
startDate: start,
endDate: end,
popValid: popValidation,
showPopError: !popValidation,
showPopError: showPopValidation,
}
},