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

The new Input type number restriction shouldn't hard-code the decimal point #3662

Closed
davep opened this issue Nov 10, 2023 · 3 comments
Closed
Labels
bug Something isn't working enhancement New feature or request Task

Comments

@davep
Copy link
Contributor

davep commented Nov 10, 2023

Currently if type="number" on an Input it will insist on the decimal point being a .. It should probably use locale.localeconv()["decimal_point"], or at least should allow the developer to say if it should be locale-sensitive or not.

@davep davep added bug Something isn't working enhancement New feature or request Task labels Nov 10, 2023
butteredwaffles added a commit to butteredwaffles/textual that referenced this issue Nov 21, 2023
@butteredwaffles
Copy link

Hi! I tried my hand at fixing this one. #3719

@willmcgugan
Copy link
Collaborator

After consideration, browsers restrict the input to the decimal point, and disallow commas. I think we should stick to this behaviour, but happy to reconsider at a future date.

Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request Task
Projects
None yet
Development

No branches or pull requests

3 participants