Calendar V19 and V18: showTime/timeOnly with minDate/minTime creates inconsistencies and bad behavior #17420
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Describe the bug
Hello everyone,
I've seen this bug in many closed issues but this is still not resolved both in v18 and v19 (I didn't tested on v17)
I set a minDate on a p-date-picker timeOnly and it's not respected.
It doesn't happen for all hours and it doesn't happen for minutes.
It happens both with a format=“12” and a format=“24”.
I've made a stackblitz to reproduce the error.
https://stackblitz.com/edit/stackblitz-starters-to16yc9k?file=src%2Fmain.ts
Example: it's 9:30 AM and i set a minTime with a value of 9:30.
When I try to lower the minutes I'm correctly blocked.
But if I lower the hours, these are displayed in the following order:
11:30 PM => 10:30 PM => 09:30 PM etc
Note that I can also change the meridiem (AM - PM)
I'm going to setup a stackblitz with the latest version of primeNG to know if it's resolved, and if i need to update to v19...
EDIT : i've just tested on v19 and still the same bad behavior
https://stackblitz.com/edit/stackblitz-starters-ipzbshrh?file=package.json
NOTE that when i move down the hour, i can then move down also the minutes..
Pull Request Link
No response
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/stackblitz-starters-ipzbshrh?file=package.json
Environment
Angular 19 and prime ng19 but it also dont work on v18
Angular version
19
PrimeNG version
v19
Node version
22.12.0
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
When I set a minDate with minTime 09:30, i need the time picker to follow the rule and prevent user to lower the hours or minutes and prevent to change the meridiem (AM or PM)
Now when i lower the hour, it upraise the hour by putting the meridiem to PM.
I have tested in multiple ways, the rule is respected but it's really weird to change the time by clicking on lower hour...
I mean i think for the user it's cleaner to only allow him to upraise the time, or down the time until the minTime is met.
The text was updated successfully, but these errors were encountered: