Skip to content

Commit

Permalink
Fix leading zero not added when input value was "0"
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Mar 15, 2021
1 parent 46c6769 commit ea13ada
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DateInput/Input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default function Input({
showLeadingZeros
&& value
&& value < 10
&& !value.toString().startsWith('0')
&& (value === '0' || !value.toString().startsWith('0'))
);
const maxLength = max ? max.toString().length : null;

Expand Down

0 comments on commit ea13ada

Please sign in to comment.