Merge pull request #5702 from m-meier/patch-4

fix(DatePicker): set hour on 24h mode on date select, fixes #5596
pull/5756/head
Tuğçe Küçükoğlu 2024-05-16 13:37:25 +03:00 committed by GitHub
commit 57de63f659
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -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);