
1、elementUI时间组件
<el-date-picker v-model="dialog.month" type="month" placeholder="选择月份" format="yyyy-MM" value-format="yyyy-MM" :picker-options="pickerOptionsYearMonth"> </el-date-picker>
js代码
//禁掉当前月之后的月份
data() {
return {
pickerOptionsYearMonth: {
disabledDate(time) {
return time.getTime() >= Date.now() - 8.64e7;
}
}
}
}
//注释:8.64e7 = 1*24*60*60*1000 = 8.64*10^7
//如果想当月也禁掉
data() {
return {
pickerOptionsYearMonth: {
disabledDate(time) {
let t =new Date().getDate();
return time.getTime() > Date.now() - 8.64e7*t;
}
}
}
}
element-ui时间选择器el-date-picker默认当前时间至7天之前时间
el-date-picker默认快捷键代码(禁掉今日之后的时间)
layDate时间组件的运用(附下载layDate-v5.3.1)
el-date-picker时间选择器默认时间为前7天(15天)
el-time-select赋值失败解决方法(从接口获取值赋值不上去)
标签: el-date-picker, 时间控件, 时间组件
上面是“elementUI禁掉当前月之后的月份”的全面内容,想了解更多关于 vuejs 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_1868.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

上海博物馆线上官方入口,一座大型的中国古代艺术博物馆
帝国cms内容页调用下线时间代码
一款专为提升效率和个性化体验设计的浏览器新标签页扩展——Tabmark
Wetab官网:一款免费ChatGPT新标签页,内置丰富小组件
Qwen2.5-Omni:阿里千问专为全方位多模态感知打造的新一代端到端多模态旗舰模型