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

input money with no decimal digits #406

Closed
enricv opened this issue Apr 29, 2024 · 5 comments
Closed

input money with no decimal digits #406

enricv opened this issue Apr 29, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@enricv
Copy link

enricv commented Apr 29, 2024

I want to use input money as a mask for large integers, but I don't see how to change the number of decimal digits (I want them to 0).

Could a parameter be defined to indicate it?

@enricv enricv added the enhancement New feature or request label Apr 29, 2024
@robsontenorio
Copy link
Owner

robsontenorio commented May 1, 2024

I think it is time to extract it to its own component “x-money”

@enricv
Copy link
Author

enricv commented May 1, 2024

In my case, will be better x-number. I was not thinking in money. I use this component to inform stadistical integer numbers for exemple: square feet, population... That's why I need the mask, but no decimals and my units don't correspond to currency.

Maybe two components or a more costumizable one.

PS: Thank you for your work, your library is very good and has helped me a lot

@robsontenorio
Copy link
Owner

robsontenorio commented May 1, 2024

If you want numbers just use <x-input /> with alpine mask

https://alpinejs.dev/plugins/mask

@s-kitade
Copy link

s-kitade commented May 2, 2024

I am Japanese.
Japanese yen does not require a decimal point.
So I want to eliminate the numbers after the decimal point.

@enricv
Copy link
Author

enricv commented May 8, 2024

If you want numbers just use <x-input /> with alpine mask

https://alpinejs.dev/plugins/mask

It worked. Thanks for your help!

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

No branches or pull requests

3 participants