p-calendar AM/PM stepper does not work correctly when the hour is set to 12.
I'm submitting a ... (check one with "x")
[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Plunkr Case (Bug Reports) Please fork the plunkr below and create a case demonstrating your bug report. Issues without a plunkr have much less possibility to be reviewed.
http://plnkr.co/edit/Qi2Nw2imLpDUF8NJinYw?p=preview
Current behavior If you create a Calendar with hourFormat set to '12' and currentHour is set to 12, then toggle the AM/PM stepper the input box and the resulting date object will not change. Regardless of the state of the AM/PM stepper, the input box and the resulting date object will become PM if the current hour is changed to 12.
Expected behavior The AM/PM stepper should affect the input box and the resulting time object regardless of what the current hour is.
Minimal reproduction of the problem with instructions http://plnkr.co/edit/i0BZP3IDxQsB2CuDFqWo?p=preview
What is the motivation / use case for changing the behavior? This bug renders certain times unreachable through the time picker.
Please tell us about your environment: Mac OS X El Capitan WebStorm Webpack 2.2.0
-
Angular version: Angular 4.0.0
-
PrimeNG version: 4.2.0-rc.1
-
Browser: All
-
Language: All
Having same issue on primeng 4.1.0-rc.2
I was using 4.1.3, updated to 4.2.0 today, still having the same issue.
Having same issue on primeng 4.1.3
Having the same issue on primeng 4.2.1. This effectively does not allow users to select certain times.
Also happens to me on 4.2.1.
Fixed this last week. Hoping it can get pulled soon.
4.2.2 plnkr (Issue 1): http://plnkr.co/edit/BTGG7n?p=preview
Is there a workaround for this while we wait for the fix to be released?
Just FYI the release for this seems to be set for 10/30, so it will not be too long before you can upgrade.
@cagataycivici Thanks for pulling this in, but RC1 for 4.3.0 does not correctly address this issue. If the hour is 00 and 12 hour time is selected, the time should still appear as 12, never 00. 12 hour time does not use 00 for hours, ever.
I.E: 24 hour time: 23:59 -> 00:00 12 hour time: 11:59 PM -> 12:00 AM
Additionally, when you type in "12:XX AM" where XX are digits, it switches it to PM, but it should be AM.
Plunker for 4.3.0 rc1 with updated demos http://plnkr.co/edit/hUfvzi7KbY93wQf3snH9?p=preview
I agree with @CNitschelm, this regression is just as much of an issue as the AM/PM. Any idea when that will be fixed?
All: Here is the new issue. https://github.com/primefaces/primeng/issues/4312