Skip to content
Permalink
Browse files

fix(DatetimePicker): fix date format error

Closes #191
  • Loading branch information...
vvpvvp committed Aug 1, 2019
1 parent 36bc5ea commit 8ffc835a3173adaddf139278e0d0fe1804c43e7f
Showing with 15 additions and 12 deletions.
  1. +3 −3 doc/package-lock.json
  2. +1 −1 doc/package.json
  3. +3 −3 package-lock.json
  4. +1 −1 package.json
  5. +7 −4 src/components/date-picker/datepicker.vue

Some generated files are not rendered by default. Learn more.

@@ -31,7 +31,7 @@
"highlight.js": "^9.10.0",
"jquery": "^3.4.0",
"less": "^3.9.0",
"manba": "^1.2.8",
"manba": "^1.3.2",
"plupload-es6": "^2.1.11",
"qiniu-js-es6": "^1.0.28",
"regenerator-runtime": "^0.13.2",

Some generated files are not rendered by default. Learn more.

@@ -17,7 +17,7 @@
],
"license": "MIT",
"dependencies": {
"manba": "^1.2.8",
"manba": "^1.3.2",
"vue": "^2.6.10"
},
"devDependencies": {
@@ -240,7 +240,7 @@ export default {
if (this.type == 'time') {
value = `1980-01-01 ${value}`;
}
this.nowView = manba(value, this.format);
this.nowView = manba(value, this.nowFormat);
this.nowDate = this.nowView.format('k');
if (initShow) {
if (this.type == 'week') {
@@ -284,9 +284,12 @@ export default {
return this.placeholder || this.t('h.datepicker.placeholder');
},
nowFormat() {
let format = this.format || options.format[this.type];
if (this.type == 'datetime' && this.hasSeconds) {
format = options.format.datetimesecond;
let format = this.format;
if (!format) {
format = options.format[this.type];
if (this.type == 'datetime' && this.hasSeconds) {
format = options.format.datetimesecond;
}
}
return format;
},

0 comments on commit 8ffc835

Please sign in to comment.
You can’t perform that action at this time.