fill input from right to left

1

I need two input that I have in an app to be filled from right to left ...

One of the inputs is value in reais (R $) and the other is value in milliliter (ml), I'm using a jquery mask (a MaskMoney works fine rather than mobile, so I opted for another jQuery.maskdinput mask) mobile, but fills input from left to right, unlike MaskMoney, and with that is a blank, or if not to fill a monetary value has to put the 0 to go to have for example ($ 9 , 00) to have nine reais.

I believe that if I can fill in the input from right to left, the problem will be solved.

    
asked by anonymous 11.01.2017 / 14:41

2 answers

1

The way is to look for a plugin that fits your needs. Unless, of course, you have a very specific requirement and choose to develop your own library.

So start here:

link or link

Try this one: link

Or this one: link

    
11.01.2017 / 18:12
3

Solution using text-align :

input {
  text-align: right;
}
<input type="text">

The solutions below using the dir attribute should apply only to languages which are written from right to left (like Arabic):

Using HTML using the dir='rtl' (right to left) attribute:

<input name="DinheiroQueEhBomEuNaoTenho" dir="rtl" />

With CSS through the direction property.

  

The direction property defines the direction in which the text is written.

Definition - direction

See an example:

input{
  direction: RTL;
}
<input name="DinheiroQueEhBomEuNaoTenho" />
    
05.10.2017 / 21:36