data(){return{
startTime:{
disabledDate: time =>{if(this.ruleForm.endDate){return(
time.getTime()>newDate(this.ruleForm.endDate).getTime()|| time.getTime()<newDate(this.ruleForm.endDate).getTime()-30*24*3600*1000)}}},
endTime:{
disabledDate: time =>{if(this.ruleForm.startDate){return(
time.getTime()<(newDate(this.ruleForm.startDate).getTime()-24*3600*1000)|| time.getTime()>(newDate(this.ruleForm.startDate).getTime()+30*24*3600*1000))}}},}}
3.时间转换为String格式方法
//返回年月日
function dateFormateYMD(time){var date =newDate(time)var year = date.getFullYear()var month =(date.getMonth()+1<10?'0'+(date.getMonth()+1): date.getMonth()+1)var day =(date.getDate()<10?'0'+(date.getDate()): date.getDate())return year +'-'+ month +'-'+ day
}//返回时分秒
function dateFormateHMS(time){var date =newDate(time)var hour =(date.getHours()<10?'0'+ date.getHours(): date.getHours())var minute =(date.getMinutes()<10?'0'+ date.getMinutes(): date.getMinutes())var second =(date.getSeconds()<10?'0'+(date.getSeconds()): date.getSeconds())return hour +'-'+ minute +'-'+ second
}//返回年月日时分秒
function dateFormateYMDHMS(time){var date =newDate(time)var year = date.getFullYear()var month =(date.getMonth()+1<10?'0'+(date.getMonth()+1): date.getMonth()+1)var day =(date.getDate()<10?'0'+(date.getDate()): date.getDate())var hour =(date.getHours()<10?'0'+ date.getHours(): date.getHours())var minute =(date.getMinutes()<10?'0'+ date.getMinutes(): date.getMinutes())var second =(date.getSeconds()<10?'0'+(date.getSeconds()): date.getSeconds())return year +'-'+ month +'-'+ day +'-'+ hour +'-'+ minute +'-'+ second
}