2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-21 03:50:35 +03:00

fix: unable set value later when range is ture (#209)

This commit is contained in:
mengxiong10
2018-12-08 13:07:34 +08:00
parent 60798f77a0
commit 97289d1ad2
2 changed files with 37 additions and 14 deletions
+6 -2
View File
@@ -258,12 +258,16 @@ export default {
return date.getTime()
},
inBefore (time, startAt) {
startAt = startAt || this.startAt
if (startAt === undefined) {
startAt = this.startAt
}
return (this.notBeforeTime && time < this.notBeforeTime) ||
(startAt && time < this.getCriticalTime(startAt))
},
inAfter (time, endAt) {
endAt = endAt || this.endAt
if (endAt === undefined) {
endAt = this.endAt
}
return (this.notAfterTime && time > this.notAfterTime) ||
(endAt && time > this.getCriticalTime(endAt))
},