
Vue Element UI 中的时间选择器配置
5星
- 浏览量: 0
- 大小:None
- 文件类型:None
简介:
本文介绍了如何在Vue框架中使用Element UI组件库来配置和自定义时间选择器,涵盖其基本用法及高级设置技巧。
需求:设置时间选择器,只能选择2018年1月1日之后且小于当前时间的数据。
data() {
return {
pickerOptions0: {
disabledDate: time => {
// 使用2018年的毫秒时间戳判断
return time.getTime() < Date.now();
}
},
pickerOptions1: {
disabledDate: time => {
// 使用2018年的毫秒时间戳判断
return time.getTime() < Date.now();
}
}
}
}
在发送请求之前进行日期的判断。
全部评论 (0)
还没有任何评论哟~


