调整时间格式

This commit is contained in:
zyy 2020-02-13 13:42:19 +08:00
parent f82c4a195e
commit 0d91bc7c49
2 changed files with 3 additions and 2 deletions

View File

@ -238,6 +238,7 @@
v-model="formModel[item.prop]"
:placeholder="item.placeholder"
:disabled="item.disabled"
:value-format="'HH:mm:ss'"
:picker-options="{ selectableRange: '00:00:00 - 23:59:59' }"
/>
</el-form-item>

View File

@ -125,8 +125,8 @@ export default {
});
},
//
formatDateTime(inputTime) {
let date = new Date(inputTime);
formatDateTime(date) {
console.log(date, 3333);
let h = date.getHours();
h = h < 10 ? ('0' + h) : h;
let minute = date.getMinutes();