RobinHerbots/jquery.inputmask — Issue #26: Support for right aligning masks?
Author: Webunity
Created: 2012-02-14 08:29:56+00:00
State: open

Hi Robin,

The following use case is at hand; people are allowed to enter a country code phone number (for instance 31 for the Netherlands, but 352 for Luxemburg).

So i have used the following code:
$('#phonecode').inputmask('99999');

This would mean that there can be 5 numbers entered.

Here comes the tricky part:
- Since it is a number (could also be used for money fields), i would like to have this field right aligned (style=text-align: right;)
- But i would like the mask to be 'removed' when the focus is lost. For instance, if i enter now something like "31" for the netherlands, the field stays like "31___" and is right aligned.

Do i miss some settings/options or is this an enhancement?