验证时间范围 type="daterange"
<DatePicker class="formItem" :size="size" v-model="item.transferTerm" disabled type="daterange" placement="bottom"
:options="disabledDate" placeholder="请选择日期区间" ></DatePicker>
:rules="{ required: true, type: 'array', message: '时间', trigger: 'change',fields: {
0: {type: 'date', required: true, message: '请选择转移期限日期'},
1: {type: 'date', required: true, message: '请选择转移期限日期'}
}
data(){
return {
disabledDate: {
disabledDate(date) {
return date && date.valueOf() > Date.now();
}
}}

转载于:https://www.cnblogs.com/sx00/p/10914041.html

Logo

前往低代码交流专区

更多推荐