Skip to content

Commit

Permalink
Merge pull request #5702 from m-meier/patch-4
Browse files Browse the repository at this point in the history
fix(DatePicker): set hour on 24h mode on date select, fixes #5596
  • Loading branch information
tugcekucukoglu committed May 16, 2024
2 parents c3669ad + 7f7b909 commit 57de63f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/lib/datepicker/DatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 57de63f

Please sign in to comment.