您好,欢迎来到华佗小知识。
搜索
您的当前位置:首页elementUI,设置日期,只能选择今天和今天以后的, :picker-options="pickerOptions"

elementUI,设置日期,只能选择今天和今天以后的, :picker-options="pickerOptions"

来源:华佗小知识
1. html 加 :picker-options="pickerOptions"
<el-date-picker
  v-model="shop.receive_time[0]"
  type="date"
  size="small"
  format="yyyy-MM-dd"
  value-format="yyyy-MM-dd"
  :picker-options="pickerOptions"
  @change="startTime(shop.seller_id, shop.receive_time)"
  placeholder="选择交货开始日期">
</el-date-picker>
2. data里加
pickerOptions: { // 收货时间不让选择今天以前的
  disabledDate(time) {
    return time.getTime() < Date.now() - 24 * 60 * 60 * 1000
  }
}
 

转载于:https://www.cnblogs.com/cengjingdeshuige/p/11169629.html

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- huatuo0.cn 版权所有 湘ICP备2023017654号-2

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务