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:
@@ -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
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user