Questions tagged [imaskjs]
27 questions
0
votes
0 answers
How to show inital value when user focusing on input using IMask
I have this mask:
when the user clicks on the input for the first time, I need to immediately add the input value '+375 ('.
Now when the user enters a number, this value appears '+375 ([user number]', but I need this value '+375 (' to appear as…

Павел Соляник
- 18
- 4
0
votes
2 answers
Replace underscores on typing number input in JavaScript
I have a text field with little underscores as (_________). How do I use JavaScript to make these dashes to be replaced by the input number upon typing? (48721____) As I type, I want the underscore to be replaced with the number I type. How do I…

Fuad Mammadov
- 3
- 2
0
votes
1 answer
JavaScript How to update the value of IMask element
I'm trying to make my IMask input update its value to be cleared when it is clicked but IMask is throwing a warning:
Element value has changed outside the mask. Sync the mask using mask.updateValue() for it to work correctly.
I've tried to use all…

Rafael
- 1
- 1
0
votes
0 answers
iMaskJS - dynamic mask with multiple possible masks
I am trying to create an input receiving and formatting an Israeli phone number.
In Israel, we have multiple phone number formats, and I wish the input could identify and format the number correctly.
For example, here are a few phone formats…

r0den
- 382
- 1
- 14
0
votes
0 answers
imask.js pads zeros at end different than the length of scale
In price mask (imask.js) I use this:
{
mask: Number,
signed: true,
scale: 3,
normalizeZeros: true,
padFractionalZeros: true,
...
}
This adds max 3 extra zeroes at the end, because the scale is 3. I want to be abble to add max 2,…

Oktay Yuzcan
- 2,097
- 1
- 6
- 15
0
votes
0 answers
How do I apply updateOptions to a certain element with iMask.js?
I have two phone number inputs on one page:

Fid
- 462
- 4
- 21
0
votes
1 answer
In vue-imask how do I get the IMask class?
My question is very similar to this one for angular: In angular-imask how do I get the IMask class?
I'm especially interested about the Vue Composition API https://github.com/uNmAnNeR/imaskjs/tree/master/packages/vue-imask#mask-composable-vue-3 to…

lbineau
- 73
- 2
- 9
0
votes
0 answers
How to implement text mask in MUI Textfield
So I want to implement a mask to my mui Textfields for price and credit card number, but idk how. For example I want the price texfield to start with "$", and the card number to be separated with "-". I've tried the things from this topic , but it…

Plamena Ivanova
- 13
- 1
- 6
0
votes
1 answer
Get IMask Value
I would like to retrieve the 'value' from the below using JavaScript:
InputMask {el: HTMLMaskElement, masked: MaskedPattern, _listeners: {…}, _value: '', _unmaskedValue: '', …}
alignCursor: ƒ ()
alignCursorFriendly: ƒ ()
el: HTMLMaskElement {input:…

orangeaeons
- 31
- 1
- 5
0
votes
1 answer
how to use imask react dynamic mask?
I'm trying to use these two masks according to the number of digits. Visually it works, but when I send the form, the first mask is always selected. How to solve this? I'm using imask-react
const maskOptions = {
mask: [
{
mask:…

Bryan Lima
- 1
- 3
0
votes
1 answer
how to have 8 or 9 digit + DDD phone mask using react imask?
I'm using lib react imask to add mask to my inputs. In case of phone, it can support numbers with 8 or 9 digits. How can I resolve this dynamically?
8 digits -> mask '(00) 0000-0000'
9 digits -> mask '(00) 00000-0000'
const mask = {
mask: '(00)…

Bryan Lima
- 1
- 3
0
votes
1 answer
How to use input mask in Javascript for username & Mac ID
I want to filter username & Mac id from one input field... if the string starts with '00' then put a colon after every two integers & characters & if it starts with alphabets did not put a colon after two characters...
var dynamicMask = new…

Muhammad Yahya Imran
- 83
- 1
- 1
- 7