diff --git a/components/lib/datepicker/DatePicker.vue b/components/lib/datepicker/DatePicker.vue index 8f2f429f80..78115e7e20 100755 --- a/components/lib/datepicker/DatePicker.vue +++ b/components/lib/datepicker/DatePicker.vue @@ -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);