Insert leading "0"s in hour/minute, days and months
See original GitHub issueIf the user types “0” to insert any value (day, hour, minute or month) the input ends up with “00” before the value.
Example: Let’s say the user wants to type the following date: “04-02-2019 09:05”. If the user types exactly these characters sequence below:
0 4 0 2 2 0 1 9 0 9 0 5
It will end up with this value in the screen: 004-002-20199, 005:mm
The desired result would be if the user could (our should/must) insert “04” or “4”. Maybe some prop configuration flag?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:12
- Comments:17 (5 by maintainers)
Top Results From Across the Web
Is it possible to add leading zeros to the day and month in rails ...
I'm trying to add leading zeros to the days and months in a date_select, and for all I can see in the docs...
Read more >Leading zeros in Excel: how to add, remove and hide - Ablebits
To add leading zeros, here's what you do: Select the target cells and run the Add/Remove Leading Zeros tool.
Read more >Formatting date/time (w/o adding the "0") - Codecademy
Does anyone know how to get the date/time to format correctly when the month/day/hour/min is a SINGLE digit? BTW, I'm not talking about...
Read more >MATLAB datevec - MathWorks
This MATLAB function converts the datetime or duration value t to a date vector—that is, a numeric vector whose six elements represent the...
Read more >datetime — Basic date and time types — Python 3.11.1 ...
Attributes: year , month , day , hour , minute , second , microsecond , and tzinfo . ... class datetime.timedelta(days=0, seconds=0, microseconds=0, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This will be fixed, but it needs https://github.com/wojtekmaj/react-date-picker/pull/272 to be merged first. For now, we rely on number inputs (from today’s point of view I think that was a mistake), which don’t report leading zeros in values, so we’re technically unaware of them.
Released react-date-picker v8.1.1 and react-time-picker v4.2.1, this should resolve the issue. Please mind that your lockfile may prevent secondary dependencies from being updated without your manual intervention.