fix(DatePicker): set hour on 24h mode on date select, fixes #5596
This commit is a copy of PR #5607 for the v4 branch. Since the component was renamed, the fix from the master branch was not applied to the new component.pull/5702/head
parent
1305a23abf
commit
7f7b909ca5
|
@ -1168,9 +1168,9 @@ export default {
|
|||
let date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);
|
||||
|
||||
if (this.showTime) {
|
||||
if (this.hourFormat === '12' && this.currentHour !== 12) {
|
||||
this.pm ? date.setHours(this.currentHour + 12) : date.setHours(this.currentHour);
|
||||
}
|
||||
(this.hourFormat === '12' && this.currentHour !== 12 && this.pm) ?
|
||||
date.setHours(this.currentHour + 12) :
|
||||
date.setHours(this.currentHour);
|
||||
|
||||
date.setMinutes(this.currentMinute);
|
||||
date.setSeconds(this.currentSecond);
|
||||
|
|
Loading…
Reference in New Issue