From 9df1fe075968b62a8d20e4c72629b261d2212123 Mon Sep 17 00:00:00 2001 From: mxie <15623530290@163.com> Date: Fri, 8 Jun 2018 12:15:52 +0800 Subject: [PATCH] fix: not-before --- datepicker/calendar-panel.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datepicker/calendar-panel.vue b/datepicker/calendar-panel.vue index 3422d43..6822fac 100644 --- a/datepicker/calendar-panel.vue +++ b/datepicker/calendar-panel.vue @@ -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) ) {