primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Calendar: showTime with dateMin creates inconsistencies

Open vmmansilla93 opened this issue 1 year ago • 2 comments

Describe the bug

When using the component of the calendar with the [showTime]="true" [dateMin]="dateMin" creates some inconsistencies with the workflow. Sometimes it works fine:

working fine

First case: Sometimes it just unable to select the min date (in the gif example min time was 15):

min time not accessible

Second case: Other times it's an infinite flow of decreasing the time (in the gif example min time was 10):

decreasing time forever

I don't know why this is happening but it should always work as the first gif no matter the time or what the user clicks before accessing the time (I don't even know how to really reproduce it because sometimes works fine, sometimes is the first case and others is the second).

Thanks in advance!

Environment

Reproducer

No response

Angular version

Last version

PrimeNG version

Last version

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20

Browser(s)

No response

Steps to reproduce the behavior

https://stackblitz.com/edit/c7hasn?file=src%2Fapp%2Fcalendar-time-demo.ts,src%2Fapp%2Fcalendar-time-demo.html,package.json

Expected behavior

If the dateMin says that the min time it's 15:00 that should be the min time to select. And shouldn't be an inconsistence of going from 15 to 16 when clicking the down arrow.

vmmansilla93 avatar Aug 01 '24 12:08 vmmansilla93

Maybe it's related with this other issue https://github.com/primefaces/primeng/issues/15609

vmmansilla93 avatar Aug 01 '24 12:08 vmmansilla93

Another inconsistency with minDate can also be found here https://github.com/primefaces/primeng/issues/15391

ThoSap avatar Sep 11 '24 14:09 ThoSap

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation and try the latest PrimeNG version(v19). If there is no improvement on this, can you open a new issue so we can include it in our roadmap?

Thanks a lot for your understanding! Best Regards,

mertsincan avatar Dec 25 '24 13:12 mertsincan