element-ui之日期时间选择器 中的datetime,限制时间不能大于当前时间
element
A Vue.js 2.0 UI Toolkit for Web
项目地址:https://gitcode.com/gh_mirrors/eleme/element
·
elemnt-ui## 标题 ##
<el-form-item label-width="120px" label="配送时间:" prop="sendTime">
<el-date-picker
v-model="mainForm.sendTime"
placeholder="选择日期时间"
type="datetime"
:editable= false
prefix-icon= "null"
:picker-options="pickerDisabled"
></el-date-picker>
</el-form-item>
data(){
props:{
mData: {
type: Object,
default() {
return {
}
}
},
},
return:{
mainForm:{
sendTime:null,
},
updata:null, //前边拿到的创建时间
pickerDisabled: { //验证时间范围
disabledDate:(time)=>{
let beginVal = this.updata;
if( beginVal) {
return time.getTime() < beginVal;
}
}, } }
methods:{
openDialog(data){ //弹窗
this.isShow = true;
this.infoData = data;
this.updata = data.crtDt;//拿到上个页面的时间
},
}
A Vue.js 2.0 UI Toolkit for Web
最近提交(Master分支:4 个月前 )
c345bb45
1 年前
a07f3a59
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update table.md
* Update transition.md
* Update popover.md 1 年前
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)