|
@@ -129,6 +129,9 @@ export default {
|
|
if(this.startMode == 'year'){
|
|
if(this.startMode == 'year'){
|
|
return startValue.valueOf() > moment().endOf('year').valueOf()
|
|
return startValue.valueOf() > moment().endOf('year').valueOf()
|
|
}
|
|
}
|
|
|
|
+ if(this.startMode == 'month'){
|
|
|
|
+ return startValue.valueOf() > moment().endOf('month').valueOf()
|
|
|
|
+ }
|
|
return startValue.valueOf() > moment(endValue).valueOf() || startValue.valueOf() > maxYearVs.valueOf()
|
|
return startValue.valueOf() > moment(endValue).valueOf() || startValue.valueOf() > maxYearVs.valueOf()
|
|
}
|
|
}
|
|
return startValue.valueOf() > maxYearVs.valueOf()
|
|
return startValue.valueOf() > maxYearVs.valueOf()
|
|
@@ -139,11 +142,11 @@ export default {
|
|
if (startValue) {
|
|
if (startValue) {
|
|
if(this.endMode == 'year'){
|
|
if(this.endMode == 'year'){
|
|
const sv = moment(startValue).startOf('year')
|
|
const sv = moment(startValue).startOf('year')
|
|
- return endValue.valueOf() < sv.valueOf() || endValue.valueOf() > maxYearVs.valueOf()
|
|
|
|
|
|
+ return endValue.valueOf() < sv.valueOf() || endValue.valueOf() > moment().endOf('year').valueOf()
|
|
}
|
|
}
|
|
if(this.endMode == 'month'){
|
|
if(this.endMode == 'month'){
|
|
const sv = moment(startValue).startOf('month')
|
|
const sv = moment(startValue).startOf('month')
|
|
- return endValue.valueOf() < sv.valueOf() || endValue.valueOf() > maxYearVs.valueOf()
|
|
|
|
|
|
+ return endValue.valueOf() < sv.valueOf() || endValue.valueOf() > moment().endOf('month').valueOf()
|
|
}
|
|
}
|
|
return moment(startValue).valueOf() > endValue.valueOf() || endValue.valueOf() > maxYearVs.valueOf()
|
|
return moment(startValue).valueOf() > endValue.valueOf() || endValue.valueOf() > maxYearVs.valueOf()
|
|
}
|
|
}
|