-
-
Notifications
You must be signed in to change notification settings - Fork 734
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
React dayPickerInput formatting to MM/DD/YYYY prevents entering the date in the input text box #584
Comments
I am not 100% sure this is the same bug, but I have this reproducable example: https://codesandbox.io/s/23lvr5861r |
@SpaceK33z yes same bug, thanks for reporting your example! |
I've noticed that the Say we have In strict mode, A solution to fix the problem could be to set up moment to run on strict mode, but it would be hard to distinguish between empty values in the input and errors (wrong format). I can add a pull request with this fix if you think this is the way to go. |
This will cause moment to return undefined when parsing a date that doesn't match the format For: gpbl#584
This will cause moment to return undefined when parsing a date that doesn't match the format For: gpbl#584
This will cause moment to return undefined when parsing a date that doesn't match the format For: gpbl#584
This will cause moment to return undefined when parsing a date that doesn't match the format For: gpbl#584
Addition to previous comment. In docs http://react-day-picker.js.org/api/DayPickerInput/#onDayChange we have: But with Forgiving Mode, all values are valid. |
This issue really does make using the day picker with a non YYYY-MM-DD very problematic for end users -- if there is anything I can do to help speed getting this PR approved, I'm more than willing to help! |
@mc-funk I’ll have some free time in the next days, expect release including the fix soon. Thanks for your patience! |
Fix published as v7.0.6: https://codesandbox.io/s/03mxznn2rl |
@gpbl should |
True, maybe i forgot to add it to the release notes 😲 |
It works with plain Date objects now |
Thank You! |
This will cause moment to return undefined when parsing a date that doesn't match the format For: gpbl#584
I have the following code sand box which is a fork of the range with 2 inputs example., https://codesandbox.io/s/w6vnlox29l I have it working the way I want but I want to input dates as
MM/DD/YYYY
instead of the default format. When I add the following attributes:I can no longer correctly enter the date in the input field the date. When I remove the format, formatDate and parseDate attributes the date picker input functions the way I expected. I have read the documentation but think I may be missing something simple. How can I use the input text box and date picker with dates formatted as
MM/DD/YYYY
?The text was updated successfully, but these errors were encountered: