Skip to content

Is there a way to force a decimal separator for useNumberField/NumberField? #5422

Answered by snowystinger
ldvilchez asked this question in Q&A
Discussion options

You must be logged in to vote

Given that lat/long coordinates really shouldn't be localized, as near as I can tell https://ux.stackexchange.com/questions/85702/localizing-coordinates

You could pass the locale 'en-US' to the hook. Then it would always have a decimal and shouldn't cause a problem because it shouldn't be localized to anything else.

When you move to the component, you can wrap it in the i18n provider https://react-spectrum.adobe.com/react-aria/internationalization.html

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@ldvilchez
Comment options

@ldvilchez
Comment options

@snowystinger
Comment options

@snowystinger
Comment options

@ldvilchez
Comment options

Answer selected by ldvilchez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants