fix:时间选择器检验错误
This commit is contained in:
@@ -411,10 +411,11 @@ export default {
|
||||
this.oldSearchTime[1] = bus.timeFormate(this.oldSearchTime[1])
|
||||
}
|
||||
}
|
||||
// console.log(moment(this.oldSearchTime[0], timeFormatMain).isValid(), moment(this.oldSearchTime[1], timeFormatMain).isValid(), !moment(this.oldSearchTime[0]).isBefore(this.oldSearchTime[1]))
|
||||
if (moment(this.oldSearchTime[0], timeFormatMain).isValid() && moment(this.oldSearchTime[1], timeFormatMain).isValid() && !moment(this.oldSearchTime[0]).isBefore(this.oldSearchTime[1])) {
|
||||
this.oldSearchTimeError[0] = true
|
||||
this.inputError = this.$t('date.fromGreaterTo')
|
||||
} else if (moment(this.oldSearchTime[0], timeFormatMain).isValid() && moment(this.oldSearchTime[1], timeFormatMain).isValid() && moment(this.oldSearchTime[0]).isBefore(this.oldSearchTime[1])) {
|
||||
this.oldSearchTimeError[0] = false
|
||||
}
|
||||
},
|
||||
dateChange () {
|
||||
@@ -422,7 +423,6 @@ export default {
|
||||
this.oldSearchTimeError[1] = false
|
||||
},
|
||||
setCustomTime (timeGroup, timeRange) {
|
||||
console.log(timeGroup)
|
||||
if (timeGroup) {
|
||||
this.showTime = this.nowTimeType = this.timeData.find(
|
||||
(item) => item.id == timeGroup.id
|
||||
|
||||
Reference in New Issue
Block a user