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

DatePicker: Wrong hour displayed for midnight when set to timeOnly and 24h #6824

Closed
Ceten opened this issue Nov 21, 2024 · 1 comment
Closed
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Ceten
Copy link

Ceten commented Nov 21, 2024

Describe the bug

When using the DatePicker component with timeOnly the hour jumps from 23 to 12 to 1 when changing the hour.
The value in the textbox and the underlying model does change to 0 correctly.
This can be seen on the PrimeVue website (https://primevue.org/datepicker/#time):
image

Reproducer

https://stackblitz.com/edit/primevue-4-ts-vite-issue-template-aeuvny?file=src%2FApp.vue

PrimeVue version

4.2.2

Vue version

3.x

Language

TypeScript

Build / Runtime

TypeScript

Browser(s)

No response

Steps to reproduce the behavior

  1. Go to https://stackblitz.com/edit/primevue-4-ts-vite-issue-template-aeuvny?file=src%2FApp.vue
  2. Open the DatePicker and click the up or down button on hour to go from 23 to 00 or 01 to 00
  3. The hour in the DatePicker jumps to 12 instead of 00, the value in the textbox is correctly set to 00

Expected behavior

The value in the DatePicker between 23 and 01 should be 00 and not 12.

@Ceten Ceten 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 21, 2024
@sivareddyuppathi
Copy link
Contributor

PR: (#6831)

@tugcekucukoglu tugcekucukoglu 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 22, 2024
@tugcekucukoglu tugcekucukoglu added this to the 4.2.3 milestone Nov 22, 2024
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

No branches or pull requests

3 participants