Skip to content

Commit

Permalink
hilongjw#141 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor Nikolayenko committed Oct 8, 2018
1 parent ce7d4ec commit 79f7e9c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion vue-datepicker-1.vue
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ exports.default = {
this.showDay(next);
},
showDay: function showDay(time) {
if (time === undefined || !Date.parse(time)) {
if (time === undefined || !(0, _moment2.default)(time, this.option.format).isValid()) {
this.checked.currentMoment = (0, _moment2.default)();
} else {
this.checked.currentMoment = (0, _moment2.default)(time, this.option.format);
Expand Down
2 changes: 1 addition & 1 deletion vue-datepicker-es6.vue
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ export default {
this.showDay(next)
},
showDay (time) {
if (time === undefined || !Date.parse(time)) {
if (time === undefined || !moment(time, this.option.format).isValid()) {
this.checked.currentMoment = moment()
} else {
this.checked.currentMoment = moment(time, this.option.format)
Expand Down
2 changes: 1 addition & 1 deletion vue-datepicker.es6-1.vue
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ export default {
this.showDay(next)
},
showDay (time) {
if (time === undefined || !Date.parse(time)) {
if (time === undefined || !moment(time, this.option.format).isValid()) {
this.checked.currentMoment = moment()
} else {
this.checked.currentMoment = moment(time, this.option.format)
Expand Down

0 comments on commit 79f7e9c

Please sign in to comment.