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

[Bug?]: Date Picker changes date selected onBlur when using format prop #3112

Open
1 of 3 tasks
caseybaggz opened this issue Dec 6, 2024 · 0 comments
Open
1 of 3 tasks
Labels

Comments

@caseybaggz
Copy link

caseybaggz commented Dec 6, 2024

Description

When I used the Date Picker API with the format prop on the Root component, I expected the date I selected to be permanent in the input field.

Instead, if you select any date on the first row/week of the month the date changes to a random date in the past when you move the focus out of the input (click anywhere on the page/onBlur).

Link to Reproduction (or Detailed Explanation)

Steps to Reproduce

  1. Go to the sandbox link
  2. Click the 📆 icon to trigger the picker
  3. Select a date after the first week
  4. DP works as expected ✅
  5. Select a date on the first week (important - must be the first week)
  6. Once the picker is closed (but still focused) - click anywhere outside the input to move the focus away
  7. 🛑 DP randomly changes the date 👈

Ark UI Version

^4.4.0

Framework

  • React
  • Solid
  • Vue

Browser

Google Chrom (latest)

Additional Information

  • If you remove the format prop from the Root component, the DP API works perfectly
  • If you use onValueChange prop (only) the API works perfectly
  • If you only use format with no additional client related props (like a custom hook useFieldState we are doing) the API still breaks on the first week
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant