Skip to content
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

Bug: Number input Control buttons min value doesn't allow typing #926

Open
Eduardo-XavierPaula opened this issue Jul 16, 2024 · 0 comments

Comments

@Eduardo-XavierPaula
Copy link

When using the Input Number with control buttons, I am unable to type a value smaller than the data-input-counter-min value, as it always reverts to the minimum value. Consequently, it is not possible to type a number larger than the minimum value if it starts with a digit less than the data-input-counter-min.

To reproduce this behavior, use the following input:

<input type="text" id="bedrooms-input" data-input-counter data-input-counter-min="5" data-input-counter-max="100" value="10" required />

When attempting to type a number between 10 and 49, the value changes back to 5 before I can finish typing.

I believe this behavior is due to an onInput() event that changes the value before I complete typing. It would be ideal to modify this event to an onchange() or an onblur() event, allowing the verification to wait until the user finishes typing the desired number before validating it.

image

  • Browser: [e.g. Chrome]
  • Flowbite Version: 2.4.1
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

No branches or pull requests

1 participant