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

DateInput splits up two digit numbers #5846

Closed
thorbde opened this issue Feb 9, 2024 · 4 comments
Closed

DateInput splits up two digit numbers #5846

thorbde opened this issue Feb 9, 2024 · 4 comments

Comments

@thorbde
Copy link

thorbde commented Feb 9, 2024

Provide a general summary of the issue here

There's an edge case where the Days segment treats valid, double digit values as two separate values, and thus splits it into days and months.

🤔 Expected Behavior?

Should input 12 in the days segment

😯 Current Behavior

Currently splits into 01 in the days segment and 02 in the months segment

💁 Possible Solution

Haven't had the time to check the source code

🔦 Context

Screen.Recording.2024-02-09.at.09.52.20.mov

🖥️ Steps to Reproduce

  1. Pick a date, either in the popover or with the dateinput field
  2. Focus the Day segment
  3. Delete the currently selected day
  4. Type in a two-digit, valid day, like 12 in the example

Version

1.0.0-rc.0

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

MacOS Sonoma 14.3

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

@ryo-manba
Copy link
Contributor

@thorbde
This should be fixed once the PR is merged!
For the cause, check here: #5223 (comment)

@ryo-manba
Copy link
Contributor

Hey @snowystinger,
The PR #5715 is merged, so we might close this issue too!

@snowystinger
Copy link
Member

snowystinger commented Feb 21, 2024

@ryo-manba thanks, I can't reproduce in the docs, which is odd given that this only went in the other day. Closing though, and if it's still a problem we can reopen

@yihuiliao
Copy link
Member

I found that I could only reproduce the issue when the date had a format of dd/mm/yyyy so it's easier to check in the storybook where you can change the locale to something like English (Great Britain).

I can confirm that with #5715 that I can no longer reproduce the original issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants