Questions tagged [input-mask]

A string expression, defined by a developer, that governs what a user is allowed to enter in as input in a text box.

An input mask is in general a set of rules, that entered data must conform to, mainly used for the purposes of data integrity by preventing transcription errors. The syntax of this string expression differs from implementation to implementation, but the fundamental input types are all supported.

Some frequent uses of input masks include entry of telephone numbers, ZIP or postal codes, times and dates.

229 questions
32
votes
7 answers

How Can I Mask My Material-UI TextField?

I have a TextField for phone numbers in a short form. And then i want to mask this form field like (0)xxx xxx xx xx. I'm trying to use react-input-mask plugin with Material-UI. But if i want to change input value, this is not updating the my main…
Batuhan Tozun
  • 487
  • 1
  • 5
  • 11
21
votes
8 answers

Input mask for numeric and decimal

I realized a software application management invoicing after having tested my program I noticed the following error: my table in sqlserver contains: price numeric (6,2) the user of my program enter price as 555.00 is good. but when he put 555555…
najeh22
  • 231
  • 1
  • 2
  • 11
19
votes
3 answers

How do I get masked date in model from input in angular using ui-mask?

I have a view which requires that the user enter their birthdate into a textbox. I am using the mask directive from UI-Utils. My view has this input element in it:
stephen776
  • 9,134
  • 15
  • 74
  • 123
11
votes
4 answers

ReferenceError: customElements is not defined

I'm using @angular@9.0.7, @ngneat/spectator@5.3.1 (with Jest), Inputmask@5.0.3 in a project and everything works on application when I run ng serve or even ng build, but it fails when I try to run a test suite for a @Pipe that uses…
dev_054
  • 3,448
  • 8
  • 29
  • 56
11
votes
3 answers

2 decimal places inputmask

I'm using RobinHerbots inputmask , How can I make 2 decimal places like 22.30 or 2.15? like 'currency' set up on the inputmask but without commas (auto generated base on values length) and currency sign. Below is my snippet of what I've tried but…
Juliver Galleto
  • 8,831
  • 27
  • 86
  • 164
11
votes
2 answers

How to restrict Primefaces inputMask to numbers only?

I want to restrict p:inputMask to numbers only, and I tried the proposed solutions from: How to restrict an input to numbers only with PrimeFaces inputMask element But none of them worked. I tried these two ways:
sasuri
  • 972
  • 3
  • 11
  • 26
11
votes
7 answers

android: the first digit in the edit text can not be zero

I have an EditText element with a number input type. I don't want users to be able to enter 0 as the first digit. Can I enforce this using XML? Here is what I have currently:
Dariush Malek
  • 914
  • 1
  • 6
  • 14
8
votes
2 answers

How use mask in input field in JSF 2 + RichFaces 4?

I need to have some masks in my input fields in my form. I try to insert the jQuery.js and jQuery.MaskedInput.js as show in the code below:
Valter Silva
  • 16,446
  • 52
  • 137
  • 218
8
votes
4 answers

Range 0-100 using jQuery inputmask plugin

How can I create mask for range from 0 to 100? $(document).ready(function() { $("#masked").inputmask(???); });
NieAR
  • 1,385
  • 6
  • 20
  • 31
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
3 answers

How to use JQuery InputMask with HTML pattern

I have HTML input box for phone numbers. I'm using InputMask to format input 860000000 in following 8 600 00 000 when typing. $(window).load(function() { var phones = [{ "mask": "# ### ## ###"}, { "mask": "# ### ## ###"}]; …
Infinity
  • 828
  • 4
  • 15
  • 41
7
votes
2 answers

Change the currency symbol or remove it in the inputmask currency

I'm using Robin Herbot's inputmask jquery plugin and I want to change the default currency symbol (by default, its a dollar currency symbol) to a PESO currency symbol or remove the currency symbol. Below is what I've tried, yes the symbol changes…
Juliver Galleto
  • 8,831
  • 27
  • 86
  • 164
6
votes
6 answers

Trying to use react-hook-form in combination with react-input mask

I have the following setup. My mask will show up, but when I type in it it just skips to the end of the line I am not quite sure what I am doing wrong here. I have tried putting all the props in the parent component and passing them all with a…
Anders Kitson
  • 1,413
  • 6
  • 38
  • 98
6
votes
1 answer

Ngx-mask Enforcing Validation on Input fields in production

My Input looks like this: I just want to use input mask but not enforce the user to strictly fill the pattern in the mask. Seems like…
GURURAJ DHARANI
  • 468
  • 1
  • 6
  • 14
6
votes
2 answers

Add input mask to React DatePicker

I have had a google and cant seem to find what I am looking for. I need a React Datepicker that allows the use of an input mask and the input mask stays in place as you override it number by number ie. dd/MM/yyyy or //____ turns to 01/0M/yyyy or…
DaRoGa
  • 2,196
  • 8
  • 34
  • 62
1
2 3
15 16