Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar: minDate bug when using 12 hourFormat #15286

Closed
synes85 opened this issue Apr 17, 2024 · 2 comments · Fixed by #15423
Closed

Calendar: minDate bug when using 12 hourFormat #15286

synes85 opened this issue Apr 17, 2024 · 2 comments · Fixed by #15423
Labels
LTS-PORTABLE Issue's fix will be ported to supported LTS versions Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@synes85
Copy link

synes85 commented Apr 17, 2024

Describe the bug

When I used the calendar component with [showTime]="true" [hourFormat]="12" properties and set a minDate to PM, after the time reached minDate, decrementing the hour resulted a strange behavior. Pressing the button decreased the hour and also changed the date.

primengcalendar.bug.mp4

Environment

Stackblitz

Reproducer

https://stackblitz.com/edit/1k7gzq

Angular version

17.3.1

PrimeNG version

17.13.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.18.0

Browser(s)

Chrome 123

Steps to reproduce the behavior

  1. Click on calendar input
  2. Select first possible day and time on calendar popup (which is the minDate)
  3. Click on hour decrementation button

Expected behavior

No response

@synes85 synes85 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 17, 2024
@RogueTea
Copy link
Contributor

Hello, I am currently looking into this. I've drafted out a solution could you please tell me if this is the correct behaviour you're looking for. I've attached a video below
29_04_2024, 17_06_15 - Screen - Untitled video.webm

@synes85
Copy link
Author

synes85 commented Apr 30, 2024

It looks good. Thank you!

@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels May 3, 2024
@cetincakiroglu cetincakiroglu added this to the 17.16.0 milestone May 3, 2024
@cetincakiroglu cetincakiroglu added the LTS-PORTABLE Issue's fix will be ported to supported LTS versions label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-PORTABLE Issue's fix will be ported to supported LTS versions Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
3 participants