Commit 174ca83d authored by liuzeheng's avatar liuzeheng

限制日期范围

parent 52d06879
...@@ -611,11 +611,15 @@ export default { ...@@ -611,11 +611,15 @@ export default {
endDate: { endDate: {
disabledDate: time => { disabledDate: time => {
if (this.form.startTime) { if (this.form.startTime) {
return ( return (
new Date( this.form.startTime).getTime() - 8.64e7 >=time.getTime() //限制日期范围
new Date( this.form.startTime).getTime() - 8.64e7 >=time.getTime() || time.getTime() >= new Date().setDate(new Date().getDate() + 30)
) )
} else { } else {
return time.getTime() >= Date.now() - 8.64e7 // 加- 8.64e7则表示包当天 // 加- 8.64e7则表示包当天
return Date.now() - 8.64e7>= time.getTime() || time.getTime() >= new Date().setDate(new Date().getDate() + 30)
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment