vue判斷開始日期不能大於截至日期


method下的方法:
checkTime() {
  var start = new Date(this.form.startDate).getTime()
  var end = new Date(this.form.endDate).getTime()
  if (start > end) {
    this.msgError(this.$t('開始時間不能大於結束時間'))
    this.form.endDate = undefined
  }
}

在兩個屬性后分別增加點擊事件

 


免責聲明!

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



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