Cleave.js can Format your input content when you are typing. It is a cool javascript which can format following formats:
Credit card number formatting
Phone number formatting
Date formatting
Time formatting
Numeral formatting
Also supports Custom options

It is quite awesome. Have a look and let me know if you any other solution for the same.

You can check it out Demo in action at:

Next Post Previous Post