Skip to content

Conversation

@johnhyde
Copy link

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.

@stevenkissack
Copy link

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

@johnhyde
Copy link
Author

@stevokk

This looks like maybe you're touching that area of code, would this pull request fix that?

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 react-datetime-picker, require my fork of react-time-picker, unignore the dist directory, build the library, and use it in your project with a GitHub url.

@wojtekmaj wojtekmaj force-pushed the main branch 2 times, most recently from f995585 to f63abe2 Compare January 19, 2022 16:00
@wojtekmaj wojtekmaj force-pushed the main branch 2 times, most recently from f9ccaaa to 1f072d8 Compare January 29, 2022 07:00
@wojtekmaj wojtekmaj force-pushed the main branch 2 times, most recently from ecb765b to bb5c818 Compare March 24, 2022 08:39
@wojtekmaj wojtekmaj force-pushed the main branch 3 times, most recently from c87e7b0 to e2b6fa8 Compare September 6, 2022 09:42
@wojtekmaj wojtekmaj force-pushed the main branch 5 times, most recently from 9095827 to da6a2c4 Compare October 21, 2022 12:28
@wojtekmaj wojtekmaj force-pushed the main branch 2 times, most recently from 8cf994b to 52e23f9 Compare November 7, 2022 13:00
@wojtekmaj wojtekmaj force-pushed the main branch 2 times, most recently from 99356e8 to 8a43327 Compare January 4, 2023 23:24
@wojtekmaj wojtekmaj force-pushed the main branch 2 times, most recently from b7c5fbd to ae20d89 Compare March 2, 2023 08:45
@wojtekmaj wojtekmaj force-pushed the main branch 2 times, most recently from fc2f3a2 to 3442fda Compare April 5, 2023 11:00
@wojtekmaj wojtekmaj force-pushed the main branch 4 times, most recently from 59333a0 to 0e76e71 Compare July 27, 2023 21:26
@wojtekmaj wojtekmaj force-pushed the main branch 2 times, most recently from a067b23 to 5e58d95 Compare October 23, 2023 10:21
@wojtekmaj wojtekmaj force-pushed the main branch 2 times, most recently from acd6c81 to a337cde Compare November 8, 2023 11:45
@wojtekmaj wojtekmaj force-pushed the main branch 2 times, most recently from 0444e97 to 9ce4800 Compare June 25, 2025 11:52
@wojtekmaj wojtekmaj force-pushed the main branch 2 times, most recently from 2e092e9 to b0c79fd Compare August 5, 2025 13:12
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

Successfully merging this pull request may close these issues.

3 participants