diff --git a/src/datetime-picker/TimePicker.js b/src/datetime-picker/TimePicker.js
index 7f021a6cd..4f6326e82 100644
--- a/src/datetime-picker/TimePicker.js
+++ b/src/datetime-picker/TimePicker.js
@@ -144,14 +144,14 @@ export default createComponent({
const hour = hourColumn.values[hourIndex] || hourColumn.values[0];
const minute = minuteColumn.values[minuteIndex] || minuteColumn.values[0];
- let innerValue = this.formatValue(`${hour}:${minute}`);
+ let innerValue = `${hour}:${minute}`;
if (this.unit === 'second') {
const second = secondColumn.values[secondIndex] || secondColumn.values[0];
innerValue += `:${second}`
}
- this.innerValue = innerValue;
+ this.innerValue = this.formatValue(innerValue);
this.updateColumnValue();
},
diff --git a/src/datetime-picker/demo/index.vue b/src/datetime-picker/demo/index.vue
index 23736f9c2..d9ea3e38b 100644
--- a/src/datetime-picker/demo/index.vue
+++ b/src/datetime-picker/demo/index.vue
@@ -99,16 +99,20 @@
+ value: {{value.datetime}}
+ value: {{value.datetime}}
+ value: {{value.time}}
+ value: {{value.secondTime}}
diff --git a/yarn.lock b/yarn.lock
index 4ce8b1905..8d9bec538 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6045,6 +6045,11 @@ decamelize@^1.1.0, decamelize@^1.1.2, decamelize@^1.2.0:
resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz"
integrity "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA=="
+decimal.js@^10.4.3:
+ version "10.4.3"
+ resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23"
+ integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==
+
decode-uri-component@^0.2.0:
version "0.2.0"
resolved "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz"