zoukankan      html  css  js  c++  java
  • iviewUI 时间选择器限制

     <FormItem>
            <Col span="12"> 创建时间:
            <Date-picker @on-change="formData.startTime=$event" :options="startTimeOptions" v-model="formData.startTime" type="date" placeholder="使用开始时间" style=" 160px"></Date-picker>
            -
            <Date-picker @on-change="formData.endTime=$event" :options="endTimeOptions" v-model="formData.endTime" type="date" placeholder="使用结束时间" style=" 160px"></Date-picker>
            </Col>
            <Col span="12" style="text-align: right;padding-right: 10px;">
            <Button type="success" icon="ios-search" style="margin-right: 10px;" @click="criteriaQuery">查询</Button>
            <Button type="info" @click="clearCriteria">重置</Button>
            </Col>
          </FormItem>

     startTimeOptions: {
            disabledDate(date) {
              if (date) {
                return  (date.valueOf() + 86400000 > new Date().getTime() + 86400000) ||date.valueOf() > new Date(_this.formData.endTime).getTime();
              }
            }
          },
          endTimeOptions: {
            disabledDate(date) {
              if (date) {
                return (date.valueOf() + 86400000 > new Date().getTime() + 86400000) || date && (date.valueOf() + 86400000 < new Date(_this.formData.startTime).getTime());
              }
            }
          }
  • 相关阅读:
    python locust 性能测试:locust安装和一些参数介绍
    输入一串字符,检查是否可以组成friend
    Django基础
    JQuery基础
    Javascript基础
    CSS基础
    HTML基础
    MYSQL数据库
    I/O模型
    协程-----Coroutine
  • 原文地址:https://www.cnblogs.com/caoruichun/p/9480225.html
Copyright © 2011-2022 走看看