Questions tagged [ngx-mask]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

Dot as a first character ( .90 ) with ngx-mask

I was trying to use ngx-mask in Angular 15 application here is my textbox looks like <input type="text" [(ngModel)]="sharePrice" mask="separator.4" separatorLimit=&...
Subhabrata Banerjee's user avatar
0 votes
0 answers
184 views

How to solve error "export 'MaskDirective' (imported as 'i3') was not found in ngx-mask" for Azure DevOps pipeline?

While building the angular app on azure devops pipeline getting an error related to ngx-mask. But on local it is working fine. The error is:- ./node_modules/cdp-angular-controls/fesm2020/cdp-angular-...
Kaito Kid's user avatar
3 votes
1 answer
243 views

NG-Zorro Datepicker Manual Input Mask not working

I need to mask the datepicker as MM/dd/yyyy and my users do not want to manually type out the /character. They want to be able to enter in just the numbers and the masking works on its own. I have ...
CodeMan03's user avatar
  • 408
0 votes
1 answer
699 views

ngx-mask v16.2.6 upgrade - Module '"ngx-mask"' has no exported member 'NgxMaskModule'

I recently upgraded ngx-mask to version 16.2.6, and after the upgrade, I'm facing an issue where the Angular compiler can't find NgxMaskModule exported from 'ngx-mask'. The error message I'm receiving ...
Sumit Arora's user avatar
  • 5,071
0 votes
0 answers
70 views

Min and Max with ngx mask

Is is possible to set a min and max values with ngx mask? and can we use ngx mask with input = "number" also? As per the documentation it have specified example for input = "text".
Student18's user avatar
  • 134
0 votes
0 answers
542 views

NGX-Mask special characters

I have a functionality where I defined custom pattern and it should allow user to enter any alphabets, numbers, spaces and special characters. In this example lets say $ At the same time I have '$' as ...
user2132124's user avatar
0 votes
3 answers
318 views

How to make an universal postcode mask for ngx-mask input?

I use ngx-mask 14.2.4. I want to allow the following conditions for my postcode input field: between 2 and 12 signs allow letters, numbers and '-'. Also allow spaces but not after '-'. I tried: <...
Hubert Kubiak's user avatar
0 votes
0 answers
525 views

How to add custom mask in Angular using ngx-mask?

I am trying to add a custom mask in angular using regular expression. Here is the mask I want: Characters allowed: Capital Letters, Small Letters, and Numbers Length of the field: 20 Can start the ...
Vedic Developer's user avatar
0 votes
0 answers
345 views

NGX-MASK Masking

I am using ngx-mask to implement masking in my angular application. https://github.com/JsDaddy/ngx-mask. My requirement is whenever user types alphabets either in small case or upper case, mask should ...
user2132124's user avatar
0 votes
0 answers
136 views

NullInjectorError using ngs-mask in angular

I want to create input field in angular, it is customized: <cs-input [field]="inputname" formControlName="inputname"></cs-input> the .ts file has declaration: ...
Ilkar's user avatar
  • 2,143
0 votes
0 answers
437 views

Using ngx-mask in angular to display mask '00.00'

I am trying to use ngx-mask to complete this task. Almost there, but i am not able to figure it out the last part. So i have following input: <input type="text" mask="00.00&...
daniel8x's user avatar
  • 1,030
0 votes
0 answers
459 views

Formatting number with ngx-mask

i try to format number value using ngx-mask pipe. So input data is: 284 and output should be 000284. and for eg. input 3 should be shown like 000003. did some one now how format for this case should ...
Павел Цыдик's user avatar
0 votes
1 answer
941 views

Mask date field in angular input

I'm trying to mask the DOB input field so that on the screen user can only see **/**/****. the input field is already using bsDatePicker. I tried to add ngx-mask to mask it like this. <input type=&...
user21431480's user avatar
0 votes
1 answer
435 views

Angular: Display time in template with mask using a pipe

I have this pipe, secondsToHms, to convert from seconds to hours, minutes and seconds: transform(seconds: number): string { const minutes = Math.floor(seconds / 60); //minutes const secs = seconds ...
jgcarrillo's user avatar
0 votes
3 answers
8k views

Angular 11 Module '"ngx-mask"' has no exported member 'NgxMaskModule'

I am running Angular 11. I have not taken any action relating to updating Angular versions; I only installed one new package which is not working. I ran npm i --save ngx-mask and it successfully ...
A. Patterson's user avatar
2 votes
1 answer
3k views

Problems with ngx-mask Angular 14.2.10

I'm having trouble using ngx-mask. My version is Angular 14.2.10. I put this in app.module.ts: import { NgxMaskModule } from 'ngx-mask'; @NgModule({ imports: [ NgxMaskModule.forRoot()]
Miriam's user avatar
  • 59
1 vote
1 answer
871 views

I want to keep .0 when use ngx-mask in angular

when I use ngx-mask in angular, it automatically deletes .0 when server response 1.0, ex: 1.0 => 1 So I want to prevent this. 1.0 keep 1.0 not 1 when use ngx-mask
Nguyễn Minh Hiếu's user avatar
0 votes
1 answer
1k views

ngx-mask don't work properly after updateValueAndValidity on the input control, angular 11

I have an input using the ngx-mask <input type="text" [mask]="maskPhoneFormat" formControlName="contactPhone" /> In the ts file I use: this.contactPopupForm.get('...
josecastillo86's user avatar
-1 votes
1 answer
322 views

error TS2322: Type 'null' is not assignable to type 'Partial<IConfig> | (() => Partial<IConfig>)'

Installed and followed Quickstart instructions of ngx-mask for app.module.ts: import { NgxMaskModule, IConfig } from 'ngx-mask' export const options: Partial<IConfig> | (() => Partial<...
Jeb50's user avatar
  • 6,482
0 votes
1 answer
324 views

Have "APP" as prefix and then allow only numbers in input field

I have a requirement where I have an input field, that must have the prefix "APP " and then allow the user to type in 7 numeric only values. I was hoping I could use ngx-mask, but it doesn't ...
jpuvo's user avatar
  • 35
1 vote
1 answer
1k views

ngx-mask issue in Angular 9

I have used ngx-mask dynamically in my app by assigning a variable to it. This is nullable variable and input shows undefined when the variable is null or undefined. This is happening after I ...
AShkANRed's user avatar
0 votes
1 answer
855 views

Angular ngx mask issue when mask has multiple optional numbers (9)

I'm trying to implement a mask for iban input. The mask is "SS00 AAAA 0000 0000 0000 9999 9999 9999 99". For some reason the mask bugs out when the optional numbers come in. It'll display a ...
HSwinnie's user avatar
0 votes
0 answers
1k views

Show Today in a mat-datepicker while keeping the date value

I am using Angular 12 and Angular Material Datepicker, and I want to be able to show strings like "Today" or "Current" when the selected date meets a condition. However I do not ...
Carlos Isidoro López's user avatar
0 votes
1 answer
983 views

I am trying to change the default promptCharacter in ngxMask in angular

I am using ngxmask in Angular to display the phone number in the following pattern: (000) 000-0000 I set showMaskTyped Property to true to always display the mask pattern in the input which looks as ...
Alwin Joseph's user avatar
2 votes
0 answers
2k views

Min and Max values with ngx-mask package

How can I set Mininmal and Maximal values for input, using ngx-mask and RegExp patterns (for example, I need to set pattern for 0-20 only numbers). Is it possible to do with ngx-mask? In component....
AlienForHumans's user avatar
2 votes
1 answer
1k views

Keep prefix even if dropSpecialCharacters is true with ngx-mask

<input matInput prefix="+55" mask=" (00) 00000-0000" [dropSpecialCharacters]="true" type="text" formControlName="phone" name="phone"> ...
strasso's user avatar
  • 21
0 votes
0 answers
1k views

Angular 13 / ngx-mask thousand seperator mask

Hello i am using the following ngx mask template: <input class="form-control" type="text" mask="separator.2" thousandSeparator=&...
GreekSwiss's user avatar
0 votes
0 answers
2k views

Angular - ngx-mask - convert mask to number

I am using ngx-mask like this: <input type="text" class="form-control" id="price" name=&...
Glauco Todesco's user avatar
3 votes
1 answer
3k views

Angular - Apply decimal pipe to an input

I want to apply decimal pipe on an input so the user can see comma separated numbers as he/she types. I have tried the ngx-mask but that only works if you type in the input. When you patch a value to ...
Saad Iqbal's user avatar
0 votes
1 answer
2k views

Is there any way to allow input dot and comma as decimal marker?

specific question! Is there a way to allow user to input comma and dot as a decimal marker, but keep the dot in displayed value and then trim thousand separators? User inputs "123456,78", ...
lucifer63's user avatar
  • 814
0 votes
1 answer
3k views

Why can't I dynamically update the mask of an input using ng-neat input-mask?

I'm currently playing around with a stackblitz here: https://stackblitz.com/edit/angular-ivy-qr7yav?file=src%2Fapp%2Fanother.component.html With both ng-neat's input-mask found here https://github.com/...
Kyle Westendorf's user avatar
0 votes
0 answers
915 views

How to mask input "(500)-000-0000" with ngx-mask?

I am using ngx-mask in my project. Normally I defined my phone number's mask like this: "(000)-000-0000)". But I am wondering how can I do it like this: "(500)-000-0000)"? When I ...
YSFKBDY's user avatar
  • 753
1 vote
0 answers
1k views

Add ngx-mask directive to existing Angular component class

Is there a way to add a directive - ngx-mask in my case - to an existing Angular component that has a named HTML element input (#datePicker in the example below)? Example setup Suppose I have a ...
mohsenmadi's user avatar
  • 2,307
0 votes
1 answer
2k views

How do you mask a decimal with optional integer ngx-mask

I'm working with ngx-mask v11.1.5 and am having difficulty creating a mask that allows both leading integers and omitted integers. For instance, both ".5" and "0.5" should be ...
vball's user avatar
  • 369
2 votes
1 answer
5k views

Angular ngx-mask - Value not formatted

I'm using this library ngx-mask and I'm trying to mask some fields (dates and phone numbers) in Angular 11 with Reactive Forms. Here are two snippets from my code <input type="text" class=...
lsotov's user avatar
  • 345
1 vote
0 answers
1k views

Angular ngx-mask prefilled data missing 0 when using suffix

I have a component which display a formgroup input field. I am also using ngx-mask with the following setup in .ts: mask: string = "separator," thousandSeparator: string = "." ...
Solo's user avatar
  • 55
4 votes
2 answers
4k views

Angular currency editor

I need to make a form control in Angular that supports editing currency values with negative number support and full keyboard support so the user can tab between inputs, type a negative symbol and ...
Adrian Brand's user avatar
  • 20.7k
0 votes
0 answers
4k views

How can i work with custom regex on ngx-mask in Angular? Using Lat/Lon coords

i need some help to work with regex on ngx Mask. I'm trying to set a mask to my Lat,Lon google coords input with a custom regex. -5.57455948, -70.5165755 This Regex fit the entire input: /^([-+]?[1-8]?...
Luiz Gabriel Parreira Pereira's user avatar
0 votes
2 answers
19k views

ngx-mask - Simple Decimal Mask Not working

I would like a textbox that allows only 2 decimals. I am using https://github.com/JsDaddy/ngx-mask/ to achieve this. This example ( using Angular 8 and an older mask version ) works , but looks like ...
Sajjan Sarkar's user avatar
2 votes
1 answer
914 views

value directive is not binding when use mask in Angular

<input type="text" class="form-control" [value]="phoneVariable" mask="000-000-0000"/> [value] is not working when I use mask in the input tag in Angular. ...
Bhavya Shah's user avatar
0 votes
1 answer
4k views

Angular 9 dynamic ngx-mask issue

I have the following input <input [(ngModel)]="myInput" mask="00-0000-0000||00-00000-0000" type="text" > and I would like to initialize it with a certain ...
Damian Kociszewski's user avatar
4 votes
2 answers
9k views

ngx-mask Do not allow negative value for the currency input

I need to block the type of negative value and do not allow to type more numbers than 99,999,999.99 for my input. Here is the code which I am using for the currency input. <input mask="...
Ashot Aleqsanyan's user avatar
2 votes
1 answer
3k views

NGX-Mask multiple masking on single input

I want to have multiple masking for zip code input to accept either 5 or 9 digits. If zipcode entered is 9 digit, it should automatically add hyphen(-) in the input. I tried optional masking(AAAAA-?A?...
Faizan Saiyed's user avatar
3 votes
2 answers
11k views

How to have thousand separator and decimal separator at once in ngx mask using angular7?

I have an angular7 app in which i have an input on which i have to apply mask using ngx-mask. I have the input like this <input matInput mask="separator.2" thousandSeparator="," [(ngModel)]="...
ahsan's user avatar
  • 277
0 votes
0 answers
3k views

NGX MASK optionals alphanumerics take wrong spot

After several tries, I haven't found solutions, i would like make a mask. Here is my problem: My mask is composed: 3 numbers required 1 space required 1 alphanumeric required 1 letter not required ...
Napo's user avatar
  • 1
0 votes
1 answer
1k views

What does Angular FormControl value actually hold and why is it different from the nativeElement value?

Update: logging blur and keyup events shows that the mask never makes it into the FormControl value. Why is that? Even calling the setValue() method on the control itself strips out the mask. Like: &...
Willie's user avatar
  • 290
1 vote
1 answer
2k views

Angular Nebular nbInput - Add mask into input fields

I need to add mask into input text fields (phone, date, email, etc). I'm using Angular and Nebular 5.0.0, and according to the official documentation, there is no mask attribute available. I had tried ...
gfinotti's user avatar
  • 633
0 votes
1 answer
184 views

How to clear all the values using ctrl+Z after numer being typed in angula8 using ngx-mask

mask for phone number field but here if i type some numbers and do ctrl+Z, it is not clearing all the values, when i do ctrlZ after typing, it must clear all the values present in it. DEMO: DEMO TS:...
Bhrungarajni's user avatar
  • 2,475
4 votes
2 answers
12k views

Angular - Input with ngx-mask MatDatepicker and reactive form

I would like to add a reactive form control over a form and an error is triggered: More than one custom value accessor matches form control with unspecified name attribute Everything works ...
Naw31's user avatar
  • 43
12 votes
1 answer
18k views

How can i get ngx-mask masked value?

I'm trying to create simple field for phone number with help of ngx-mask module like this: <mat-form-field> <input matInput formControlName="PhoneNumber" placeholder="Phone ...
Kngh2's user avatar
  • 397