vue element ui 时间选择器查找两个日期之间所有天
<el-form-item label="选择时间">//时间选择器
<el-date-picker
v-model="changeTime"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
getdate(){
var start=new Date(this.changeTime[0]);
var day;
while(start<=this.changeTime[1]){
console.log(start.getDate())
if(start.getDate()<10){
day='0'+start.getDate().toString()
}else {
day=start.getDate().toString()
}
var month =start.getMonth()+1;
var date=[];
var startTime=start.getFullYear()+"年"+(month < 10 ? '0' + month : '' + month)+"月"+day+"日";
date.push(startTime);
start.setDate(start.getDate()+1);
}