<el-date-picker
v-model.trim="form.endTime"
type="datetime"
:picker-options="pickerOptions"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择结束日期时间">
</el-date-picker>
</el-form-item>
data(){
return: {
pickerOptions: {
disabledDate:(time)=> {
// console.info('******getTime****', time.getTime())
return time.getTime() < Date.now()-1 * 24 * 3600 * 1000
}, // 禁用日期
selectableRange: `${Date().split(" ")[4]} - 23:59:59`, // 打开默认当前时间
}
},
}
}
标签:return,getTime,之前,时间,time,Date,59,选择器
From: https://www.cnblogs.com/baozhengrui/p/17782056.html