I found a beautiful JS plugin which gives the developer option to mask the in input based on type of input you specify for a text box.
It can be
It can be
- Date
- Phone Number
- Car Plate number etc...
Here is the link to the site.