Skip to content

Commit

Permalink
Fixed #5108 - Calendar: 12h time picker changes from 12 am to 12 pm a…
Browse files Browse the repository at this point in the history
…utomatically
  • Loading branch information
tugcekucukoglu committed Jan 26, 2024
1 parent b2bc41f commit 87c9440
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/lib/calendar/Calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 87c9440

Please sign in to comment.