-
Notifications
You must be signed in to change notification settings - Fork 420
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: Unable to enter date manually #2956
Comments
Thanks for opening your first issue! 👋 |
The previous bug removed focus from the input, but great call out on the example. Would changing state on focus blur of the input fix the issue instead of the onChange event? |
That may solve it. As long as the user can finish typing in the date before it attempts to format it should be fine. |
@chuyler If you look at the examples on storybook, you should be able to see an example that uses a custom input. In the documentation they point out to the examples as well to get more familiar with the library. I made an example on how you should use it. |
@AbuHafsa Your example suffers from the same bug. Regardless of what is used for an input, when the user types in a single character into the text box, it tries to format the date. It needs to wait until all characters have been entered before triggering the formatter. I tried using "onBlur" instead of "onChange" to update the state but that doesn't work either. |
This issue has been automatically marked as stale, because it has not had recent activity. It will be closed if no further activity occurs. Maintainers are responsible for tech debt and project health. This is most likely a new components or component feature request. Please submit a pull request for or request feedback on this feature. Thank you. |
I have made an attempt at fixing this so our customers can enter dates manually. Please review the fix and suggest improvements. |
Hello, anyone has resolved this feature ? |
@brahimkraiem see my pull request above that has not been merged. If you can convince them to merge it, we'll have this working. |
@interactivellama |
Is this package still under development? How has no one else prioritized the ability to change dates? I provided a solution but no one is willing to review and merge it. |
As seen from demo page: https://react.lightningdesignsystem.com/components/date-pickers/
Click on the date picker component and start entering a date using the keyboard
Expected: the characters should be displayed as typed in, date picker component should close, user should be able to continue to enter numeric and date format characters based on locale ( 0-9 / - etc).
Actual: As soon as first numeric character is entered, the date is auto-completed to the first day of the first month of this year. Enter "1" and it fills in "1/1/2021". Enter "2" and it fills in "2/1/2021". You cannot modify this date without it continuing to change it on you.
This was previously reported 2 years ago but has not been properly resolved.
#2285
The text was updated successfully, but these errors were encountered: