Merge pull request #5702 from m-meier/patch-4
fix(DatePicker): set hour on 24h mode on date select, fixes #5596pull/5756/head
commit
57de63f659
|
@ -1168,9 +1168,9 @@ export default {
|
||||||
let date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);
|
let date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);
|
||||||
|
|
||||||
if (this.showTime) {
|
if (this.showTime) {
|
||||||
if (this.hourFormat === '12' && this.currentHour !== 12) {
|
(this.hourFormat === '12' && this.currentHour !== 12 && this.pm) ?
|
||||||
this.pm ? date.setHours(this.currentHour + 12) : date.setHours(this.currentHour);
|
date.setHours(this.currentHour + 12) :
|
||||||
}
|
date.setHours(this.currentHour);
|
||||||
|
|
||||||
date.setMinutes(this.currentMinute);
|
date.setMinutes(this.currentMinute);
|
||||||
date.setSeconds(this.currentSecond);
|
date.setSeconds(this.currentSecond);
|
||||||
|
|
Loading…
Reference in New Issue