时间日期格式: 选择当前月前一年的时间范围:
<el-date-picker
v-model="pageList.monthrange"
type="monthrange"
range-separator="至"
format="yyyy-MM"
value-format="yyyy-MM"
start-placeholder="开始月份"
end-placeholder="结束月份"
:picker-options="pickerOptions"
></el-date-picker>
pickerOptions: {
disabledDate: (time) => {
return time.getTime() < Date.now() - 365 * 24 * 60 * 60 * 1000 || time.getTime() > Date.now(); // 返回 所有时间 大于 当前时间
}
},
// 时间禁用范围:
el-date-picker 时间日期格式
最新推荐文章于 2024-08-21 09:26:52 发布