Fix edge cases where the number 0 is passed to an input#116
Open
johnhyde wants to merge 10 commits intowojtekmaj:mainfrom
Open
Fix edge cases where the number 0 is passed to an input#116johnhyde wants to merge 10 commits intowojtekmaj:mainfrom
johnhyde wants to merge 10 commits intowojtekmaj:mainfrom
Conversation
|
I've just been looking at a project that uses this library and was amazed to see if I added 00 for the minutes or seconds it ends up as "000" This looks like maybe you're touching that area of code, would this pull request fix that? Repro case: just go to the demo and type 00 Chrome v90 & Ubuntu 20.04 |
Author
|
@stevokk
Yes, it does, if I remember correctly. I'm hoping @wojtekmaj can find time to review this at some point, but if you don't want to wait for that you can always do what I did and fork |
f995585 to
f63abe2
Compare
f9ccaaa to
1f072d8
Compare
ecb765b to
bb5c818
Compare
c87e7b0 to
e2b6fa8
Compare
9095827 to
da6a2c4
Compare
8cf994b to
52e23f9
Compare
99356e8 to
8a43327
Compare
b7c5fbd to
ae20d89
Compare
fc2f3a2 to
3442fda
Compare
59333a0 to
0e76e71
Compare
a067b23 to
5e58d95
Compare
acd6c81 to
a337cde
Compare
0444e97 to
9ce4800
Compare
2e092e9 to
b0c79fd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes this issue: wojtekmaj/react-datetime-picker#147
As well as an issue with showing leading zeroes.
Both issues stem from the fact that sometimes the value of the input element is the number 0 rather than the string "0", and since the number 0 is falsey, this value is interpreted as the input being empty when it's not.