Questions tagged [maskedinput]

This jQuery plugin allows the application of a mask for fixed width inputs. This saves the user keystrokes and helps standardize data.

This jQuery plugin allows the application of a mask for fixed width inputs. This saves the user keystrokes and helps standardize data

Try out a demonstration.

203 questions
32
votes
7 answers

jquery masked input plugin to not clear field when errored

I'm looking at the http://digitalbush.com/projects/masked-input-plugin/ I'm calling it like this: $(control).mask('999-999-9999'); And I don't want it to throw away the users input if something is wrong, e.g. they haven't…
McKay
  • 12,334
  • 7
  • 53
  • 76
29
votes
15 answers

Phone mask with jQuery and Masked Input Plugin

I have a problem masking a phone input with jQuery and Masked Input Plugin. There are 2 possible formats: (XX)XXXX-XXXX (XX)XXXXX-XXXX Is there any way to mask it accepting both cases? EDIT: I tried: $("#phone").mask("(99) 9999-9999");…
JHispa
  • 323
  • 1
  • 4
  • 6
28
votes
10 answers

How to change Phone number format in input as you type?

My CodePen: http://codepen.io/leongaban/pen/cyaAL I have an input field for a phone number which allows up to 20 characters (for international numbers). I'm also using the Masked input jQuery plugin by Josh Bush to format the phone number in the…
Leon Gaban
  • 36,509
  • 115
  • 332
  • 529
25
votes
7 answers

Conflict between jQuery Validate and Masked Input

I've got a form that's using both jQuery Validate and Masked Input for phone number and US zip code fields. For example, for a US zip code, Masked Input allows only numbers to be entered, and forces either the format "99999" or "99999-9999" (where 9…
Nathan Long
  • 122,748
  • 97
  • 336
  • 451
22
votes
7 answers

Remove literals from input mask after form submit?

this question has already been asked but the solutions where not clear. Im using Josh Bush's MaskedInput plugin for jQuery What im trying to achieve is: E.g: a phone input with the mask $("#txtPhone").mask("(99)9999-9999"); EQUALS:…
Wednesday Man
  • 359
  • 2
  • 3
  • 12
18
votes
4 answers

Masked input for currency jQuery

In my web application I have an input field called "Budget" where users enter the proposed budget for a project. I need to create a masked input to automatically bring the entered amount to the following format while the user is typing into the…
cycero
  • 4,547
  • 20
  • 53
  • 78
17
votes
5 answers

Is there masked input plugin for knockout.js using extenders?

I've seen this post - it shows one possible solution. But I would like to have a more elegant way of doing masked input. It should also play nicely with knockout validation plugin (or maybe extending it). Anyone know how is there similar project out…
kyrisu
  • 4,541
  • 10
  • 43
  • 66
12
votes
3 answers

Angular 2 multiple custom value accessor

I am creating an application using angular2. I need to get a Date from user input using a calendar popover, but I need to put a mask on user input to stay in this format dd-mm-YYYY when he is typing. I am using two different modules that I got from…
10
votes
4 answers

jquery.maskedinput programmatically set value and apply mask?

I'm using DigitalBush's MaskedInput jquery plugin. I have a simple input box for a phone number: $('#txt_PhoneNumber').mask('(999) 999-9999'); Sometimes the field is programmatically filled with a non-formated number such as 5551234567. How can I…
Corey Ogburn
  • 24,072
  • 31
  • 113
  • 188
10
votes
1 answer

How to pre-populate 9 with jQuery Masked Input Plugin?

I am using Masked Input Plugin from digitalBush for jQuery, which is very simple to use. For some cases, I want to pre-populate data for the client, so for something like this : .mask("123999") client will see: 123___ And will need to insert last…
Ivan Sokalskiy
  • 812
  • 7
  • 14
9
votes
3 answers

maskedinput Uncaught TypeError: $(...).mask is not a function

Good afternoon On my there is
Susana Santos
  • 312
  • 1
  • 6
  • 18
9
votes
3 answers

Masked input is not working in android phones

Hi I have used the masked input plugin click for my website to format the phone number which is entered by the user I am using the format as (123) 456-7890 its working fine with PC's but when I browse the site with android devices and enter the…
786543214
  • 855
  • 4
  • 14
  • 29
8
votes
1 answer

jQuery Input Mask Not Working

I am trying to set up a donations page for people to give money to a non-profit and allow them to specify the uses of the money. I have it set up that it totals the amounts the giver puts in each field as they enter amounts. I am trying to add an…
Andrew
  • 467
  • 3
  • 7
  • 22
7
votes
1 answer

AngularJS validation, binding, etc. not working when using jQuery plugins (eg. autoNumeric)

I have an angular form which was using angular's built-in validation successfully. Take the following markup for example:
When…
mellis481
  • 4,332
  • 12
  • 71
  • 118
7
votes
2 answers

jquery masked input have only first number optional rest mandatory

Im using jquery masked input plugin and need to have a phone field with the following format: 1 (222) - 000 - 1114 my code looks like this: $("#myPhone").mask("9 (999) - 999 - 9999"); now i cant seem to get it to work to make the first digit…
GGio
  • 7,563
  • 11
  • 44
  • 81
1
2 3
13 14