Commit e2b958b4 authored by 潘永坪's avatar 潘永坪

日历禁用修改

parent 79627ed6
......@@ -3,10 +3,9 @@
:show="showPop"
@confirm="onConfirm"
@close="showPop=false"
:maxDate="maxDate"
:minDate='minDate'
:defaultDate="defaultDate"
:formatter='formatter'
:customList='customList'
ref="calendar2"
rowHeight='112'
round='20'
......@@ -21,10 +20,14 @@ export default {
dateList:{
handler(newValue, oldValue){
if(newValue&&newValue.length>0){
this.maxDate=newValue[newValue.length-1].startTime.substr(0,10)
//默认和最小日期都为第一天
this.minDate=newValue[0].startTime.substr(0,10)
this.customList=newValue.map(item=>{
return item.startTime.substr(0,10)
})
this.defaultDate=newValue[0].startTime.substr(0,10)
//由于传入了customList,最大日期和最小日期可以取消
// this.maxDate=newValue[newValue.length-1].startTime.substr(0,10)
// //默认和最小日期都为第一天
// this.minDate=newValue[0].startTime.substr(0,10)
}
},
deep:true,
......@@ -37,6 +40,7 @@ export default {
defaultDate:'', //默认日期
maxDate:'',//最大日期
minDate:'',//最小日期
customList:[],//转化之后的日期列表
}
},
mounted() {
......@@ -67,9 +71,6 @@ export default {
// day.dot = true
// }
// })
// if (!day.bottomInfo) {
// day.type = 'disabled'
// }
return day
}
......
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