diff --git a/components/lib/calendar/Calendar.vue b/components/lib/calendar/Calendar.vue index 338c4f80b..428c37583 100755 --- a/components/lib/calendar/Calendar.vue +++ b/components/lib/calendar/Calendar.vue @@ -1155,8 +1155,9 @@ export default { let date = new Date(dateMeta.year, dateMeta.month, dateMeta.day); if (this.showTime) { - if (this.hourFormat === '12' && this.pm && this.currentHour != 12) date.setHours(this.currentHour + 12); - else date.setHours(this.currentHour); + if (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);