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: maxDate with 12-hour formatting restricts values incorrectly #3253

Closed
dmcbride opened this issue Nov 14, 2022 · 0 comments · Fixed by #3293
Closed

Calendar: maxDate with 12-hour formatting restricts values incorrectly #3253

dmcbride opened this issue Nov 14, 2022 · 0 comments · Fixed by #3293
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@dmcbride
Copy link

Describe the bug

If you set a max-date for a calendar to include a max time, and using the 12-hour format, it is not taking into consideration AM/PM parts when determining how to restrict the values.

Reproducer

https://codesandbox.io/s/quizzical-murdock-2uwuvr?file=/src/App.vue

PrimeVue version

3.18.1

Vue version

3.x

Language

ES6

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

<Calendar show-time hour-format="12" :max-date=maxDate />

where "maxDate" includes a time part that is in the AM, say 10AM

Change the AM/PM to PM. This is accepted. It shouldn't be.

Expected behavior

Should not be able to select 10PM on the last day when the max-date is set to 10AM.

@dmcbride dmcbride added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 14, 2022
@bahadirsofuoglu bahadirsofuoglu 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 Nov 15, 2022
@bahadirsofuoglu bahadirsofuoglu self-assigned this Nov 18, 2022
@tugcekucukoglu tugcekucukoglu added this to the 3.20.0 milestone Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants