2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-14 17:12:27 +03:00

fix: not-before

This commit is contained in:
mxie
2018-06-08 12:15:52 +08:00
parent 0f28943abc
commit 9df1fe0759
+2 -2
View File
@@ -259,8 +259,8 @@ export default {
const now = new Date(date).getTime()
if (
this.$parent.disabledDays.some(v => new Date(v).setHours(0, 0, 0, 0) === now) ||
this.$parent.notBefore !== '' && now < new Date(this.$parent.notBefore).getTime() ||
this.$parent.notAfter !== '' && now > new Date(this.$parent.notAfter).getTime() ||
this.$parent.notBefore !== '' && now < new Date(this.$parent.notBefore).setHours(0, 0, 0, 0) ||
this.$parent.notAfter !== '' && now > new Date(this.$parent.notAfter).setHours(0, 0, 0, 0) ||
this.startAt && now < new Date(this.startAt).setHours(0, 0, 0, 0) ||
this.endAt && now > new Date(this.endAt).setHours(0, 0, 0, 0)
) {