<el-date-picker
size="mini"
v-model="startenddate"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions0"
:editable="false"
:clearable="true"
>
</el-date-picker>
data(){
return {
startenddate:'',
startdate:'2018-06-01',
enddate:'2018-06-30',
pickerOptions0:this.limitDate(),
}
},
methods: {
limitDate(){
let self = this;
return {
disabledDate(time){
return time.getTime() < new Date(self.startdate).getTime() || time.getTime() > new Date(self.enddate).getTime();
}
}
},
}