mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 17:32:36 +00:00
Merge pull request #6687 from Alex-Grimes/fix/datepicker-changes-12am-to-12pm-on-date-selection
Fix/datepicker changes 12am to 12pm on date selection
This commit is contained in:
commit
ff099dfac6
1 changed files with 3 additions and 1 deletions
|
@ -998,7 +998,6 @@ export default {
|
||||||
this.pm = currentHour > 11;
|
this.pm = currentHour > 11;
|
||||||
|
|
||||||
if (currentHour >= 12) currentHour = currentHour == 12 ? 12 : currentHour - 12;
|
if (currentHour >= 12) currentHour = currentHour == 12 ? 12 : currentHour - 12;
|
||||||
else currentHour = currentHour == 0 ? 12 : currentHour;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.currentHour = Math.floor(currentHour / this.stepHour) * this.stepHour;
|
this.currentHour = Math.floor(currentHour / this.stepHour) * this.stepHour;
|
||||||
|
@ -2925,6 +2924,9 @@ export default {
|
||||||
return yearPickerValues;
|
return yearPickerValues;
|
||||||
},
|
},
|
||||||
formattedCurrentHour() {
|
formattedCurrentHour() {
|
||||||
|
if (this.currentHour == 0) {
|
||||||
|
return this.currentHour + 12;
|
||||||
|
}
|
||||||
return this.currentHour < 10 ? '0' + this.currentHour : this.currentHour;
|
return this.currentHour < 10 ? '0' + this.currentHour : this.currentHour;
|
||||||
},
|
},
|
||||||
formattedCurrentMinute() {
|
formattedCurrentMinute() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue