Skip to content

Commit

Permalink
Merge pull request #6687 from Alex-Grimes/fix/datepicker-changes-12am…
Browse files Browse the repository at this point in the history
…-to-12pm-on-date-selection

Fix/datepicker changes 12am to 12pm on date selection
  • Loading branch information
tugcekucukoglu authored Nov 12, 2024
2 parents c9b3079 + 594d470 commit ff099df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/primevue/src/datepicker/DatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,6 @@ export default {
this.pm = currentHour > 11;
if (currentHour >= 12) currentHour = currentHour == 12 ? 12 : currentHour - 12;
else currentHour = currentHour == 0 ? 12 : currentHour;
}
this.currentHour = Math.floor(currentHour / this.stepHour) * this.stepHour;
Expand Down Expand Up @@ -2925,6 +2924,9 @@ export default {
return yearPickerValues;
},
formattedCurrentHour() {
if (this.currentHour == 0) {
return this.currentHour + 12;
}
return this.currentHour < 10 ? '0' + this.currentHour : this.currentHour;

Check failure on line 2930 in packages/primevue/src/datepicker/DatePicker.vue

View workflow job for this annotation

GitHub Actions / build (18)

Expected blank line before this statement

Check failure on line 2930 in packages/primevue/src/datepicker/DatePicker.vue

View workflow job for this annotation

GitHub Actions / build (20)

Expected blank line before this statement
},
formattedCurrentMinute() {
Expand Down

0 comments on commit ff099df

Please sign in to comment.