Skip to content

Issue #7955 overridden by commit b001959 #8512

@naokitominagautah

Description

@naokitominagautah

Describe the bug

I'm just going to copy and paste the same description from #7995 which was fixed but then was ovewritten. The override occurred in commit b001959.

When using the date picker in a form and specifiyng a date format - clicking twice on an already selected date causes the date picker to disrespect the date format and instead provide a default with midnight time and my current browser time zone.

I would expect a second click to not cause this behavior. In the prime vue docs this is not described and there is no property to disable this. This happens when time is not even enabled.

This issue seems to happen when the Input is in the Form

475913774-9fbf2c27-d650-4da5-9468-56d243eefbf0.mov

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/k2ghqhyg-6fu18weq?file=src%2FApp.vue

Environment

MacOS chrome

Vue version

3.5.30

PrimeVue version

4.5.0

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

1.) Open the date picker example on your demonstration website or stackblitz (https://primevue.org/datepicker/#forms)
2.) Select a day
3.) Format is fine 08/05/2025
4.) Select the same day again
5.) You get something like this: Tue Aug 05 2025 00:00:00 GMT+0200 (Mitteleuropäische Sommerzeit)

Expected behavior

1.) Open the date picker example on your demonstration website or stackblitz (https://primevue.org/datepicker/#forms)
2.) Select a day
3.) Format is fine 08/05/2025
4.) Select the same day again
5.) You get something like this: 08/05/2025

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Needs TriageIssue will be reviewed by Core Team and a relevant label will be added as soon as possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions