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
  }
}
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM