Skip to content

Commit

Permalink
fix(date-picker): support HH in custom-types (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
xxyan0205 authored May 11, 2019
1 parent cf3ec21 commit 44b846d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/date-picker/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const TYPE_FORMAT = {
'yyyy': 'Year',
'MM': 'Month',
'dd': 'Date',
'HH': 'Hour',
'hh': 'Hour',
'mm': 'Minute'
}
Expand Down Expand Up @@ -553,7 +554,8 @@ export default {
if (value < 10) {
value = '0' + value
}
format = format.replace('HH', 'hh') // deal with HH as hh
format = format.replace(item.type, value)
format = format.replace(TYPE_FORMAT_INVERSE[item.type], value)
})
Expand Down

0 comments on commit 44b846d

Please sign in to comment.