mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 17:32:36 +00:00
Fixed #5596 - Calendar: Hours are set to 00 when clicking the "Today" button
When the "Today" button is clicked, the hours field is set to 00 instead of the current hour. The minutes field is populated correctly.
This commit is contained in:
parent
6615f31d8a
commit
f5578a46de
1 changed files with 3 additions and 3 deletions
|
@ -1162,9 +1162,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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue