Skip to content

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

@caseybaggz

Description

@caseybaggz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions