Check against the contract dates instead of the current maxStart and minEnd values to calculate the new maxStart and minEnds

This commit is contained in:
leigh-mil
2019-10-01 12:02:54 -04:00
parent b7677018c2
commit a5d34f9bb2
2 changed files with 6 additions and 4 deletions

View File

@@ -45,6 +45,8 @@ export default {
return {
maxStartDate: maxStartDate,
minEndDate: minEndDate,
contractStart: contractStart,
contractEnd: contractEnd,
}
},
@@ -60,7 +62,7 @@ export default {
},
calcMaxStartDate: function(date) {
if (!!date && date < this.maxStartDate) {
if (!!date && date < this.contractEnd) {
return date
} else {
return this.maxStartDate
@@ -68,7 +70,7 @@ export default {
},
calcMinEndDate: function(date) {
if (!!date && date > this.minEndDate) {
if (!!date && date > this.contractStart) {
return date
} else {
return this.minEndDate