Mask for ion-input
See original GitHub issueFeature Request
Masks for inputs on Ionic v4
Ionic Info
Ionic:
ionic (Ionic CLI) : 4.1.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.3
@angular-devkit/core : 0.7.0-rc.3
@angular-devkit/schematics : 0.7.0-rc.3
@angular/cli : 6.0.8
@ionic/ng-toolkit : 1.0.0
@ionic/schematics-angular : 1.0.1
System:
NodeJS : v9.1.0 (/usr/local/bin/node)
npm : 5.5.1
OS : Linux 4.4
Describe the Feature Request Being able to natively add masks to ion-input, a pretty standard feature for most applications.
Describe Preferred Solution
<ion-input mask="(999) 999-9999" mask-placeholder="_"></ion-input>
Issue Analytics
- State:
- Created 5 years ago
- Reactions:91
- Comments:33 (9 by maintainers)
Top Results From Across the Web
@thiagoprz/ionic-input-mask - npm
Mask for ion-input. Latest version: 0.0.5, last published: 24 days ago. Start using @thiagoprz/ionic-input-mask in your project by running ...
Read more >Need a Mask for ion-input ionic v4
I'm trying to use br-mask with the settings above. Normal bass via npm: npm install br-mask --save -E, then just insert the module...
Read more >Ionic Input Mask (forked) - StackBlitz
Starter project for Ionic apps that exports to the Ionic CLI.
Read more >Ionic - Format (use mask) input as currency - YouTube
Learn how to format numbers as currency for an Ionic / Angular project. To mask an input as currency is very easy with...
Read more >Ionic 3 input mask - angular - Stack Overflow
step1 ; Directive, Attribute } from ; import { NgModel } from ; Directive({ selector: '[mask]' ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Based on @adamduren solution, here is a more generic directive :
Use it like that in your component’s template :
And in your component’s controller :
+1