Merge pull request #5607 from thristov78/patch-1

Fixed #5596 - Calendar: Hours are set to 00 when clicking the "Today" button
pull/5630/head
Tuğçe Küçükoğlu 2024-04-19 14:51:19 +03:00 committed by GitHub
commit dd71f32314
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -1162,9 +1162,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);