2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-09 11:02:26 +03:00

Set to 0 hour, compare on 0 hour for notAfter, bump version

This commit is contained in:
Aaron J. Rubin
2017-06-16 17:12:52 -04:00
parent bd85c96bfc
commit 2f622cb8c9
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -104,7 +104,7 @@ export default {
function getCalendar (time, firstday, length, classes) {
return Array.apply(null, { length }).map((v, i) => { // eslint-disable-line
let day = firstday + i
const date = new Date(time.getFullYear(), time.getMonth(), day)
const date = new Date(time.getFullYear(), time.getMonth(), day, 0, 0, 0)
return {
title: date.toLocaleDateString(),
iso: cal.isoDate(date),
@@ -162,7 +162,7 @@ export default {
classes.push('disabled');
} else if (
(this.notBefore !== '' && cell.date.getTime() < (new Date(this.notBefore)).getTime()) ||
(this.notAfter !== '' && cell.date.getTime() > (new Date(this.notAfter)).getTime())
(this.notAfter !== '' && cell.date.getTime() > (new Date(this.notAfter+' 00:00:00')).getTime())
) {
classes.push('disabled');
}
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "vue2-datepicker",
"description": "A Datepicker Component For Vue2",
"main": "datepicker/index.vue",
"version": "1.2.2",
"version": "1.2.3",
"scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"