mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-07 11:32:27 +03:00
fix
This commit is contained in:
@@ -142,17 +142,18 @@ export default {
|
||||
const endTime = this.endAt ? new Date(this.endAt).setHours(0, 0, 0, 0) : 0
|
||||
const today = new Date().setHours(0, 0, 0, 0)
|
||||
|
||||
classes.push(cell.classes)
|
||||
|
||||
if (this.disabledDays.some(v => +new Date(v) === +cell.date) ||
|
||||
(this.notBefore !== '' && cell.date.getTime() < (new Date(this.notBefore)).getTime()) ||
|
||||
(this.notAfter !== '' && cell.date.getTime() > (new Date(this.notAfter)).getTime())) {
|
||||
classes.push('disabled')
|
||||
return 'disabled'
|
||||
}
|
||||
|
||||
classes.push(cell.classes)
|
||||
|
||||
if (cellTime === today) {
|
||||
classes.push('today')
|
||||
}
|
||||
|
||||
// range classes
|
||||
if (cellTime === curTime) {
|
||||
classes.push('current')
|
||||
|
||||
@@ -20,6 +20,8 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
value1: '2017-5-9',
|
||||
disabledDays: ['2017-8-13'],
|
||||
notAfter: '2017-9-16',
|
||||
value2: ''
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user