Hello,
Can anyone help me removing the rightAlign property for the decimals mask? I saw on the github documentation some information related to this but I couldn't manage to do it in a reactive application.
https://github.com/RobinHerbots/Inputmask#rightalign
Regards,
Bogdan
Ok,
I think I found some solution for now, in the JS (inputmask_min.js) I modified the rightAlign: 0! with rightAlign: 1! wherever it occured and now text is left aligned.
I'm sure there are also other options to do it via a JS in the screen you are using this widget, but this does the job for me as well.
Unfortunately this didn't work for me. Making the code changes listed above broke the script file.
I've come up with the following solution.Add a class to the input element that forces the align left. This will overwrite the "style" element set by the InputMask componant:
Add Style Class on the element
"form-control alignLeft"
Style sheet CSS:
/* InputMaskCurrency */ .alignLeft, .form-control.alignLeft { text-align: left !important; }
Hi Bogdan,
when you see for decimal or number input in input mask by default property is
text-align: right;
you can overwrite this
go to input property and set
style:"text-align: left"
Regards
Rahul Sahu
Hi Rahul.
Which property is this ?
Or where can I find this property settings?
Hi Rahul,
It still doesn't work like this. It seems the style is somehow applied using the javascript from this library. I would need something in the OnReady for the screen in order to set the rightAlign property to false (or !0 idk).
See below example from the javascript where this property is set
Hi, thanks for bringing this to my attention,I'll try to create a new version that has more options for you to customize the behavior of the input mask.Regards,
This would be very helpful.We run into the same problem where this component is overwriting align:left on the input element.
If you don't want to customize the plugin you also can solve this using JS on the screen. You can do something like this in the OnReady function of your screen or web block:
Joana Salgueiro
I have just created a JS script that you can use in the on ready Client action that capture all the inputs In which you want the text to be aligned to left. you can follow the below steps :
I hope it will solve the issue, and it is optimized if you have multiple Inputs and some are rendering after some conditions or later stages of the screen. If you have any more issues or question do ping me anytime.