How to use react-input-mask with Input?
See original GitHub issue<Input
{...input}
valid={!meta.touched ? null : meta.valid}
type="tel"
placeholder={placeholder}
tag={InputMask}
/>
This sample doesn’t work. How to apply mask to Input component?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Implementing react-input-mask for web apps - LogRocket Blog
The react-input-mask library renders masked input boxes using typical HTML inputs. Therefore, you can change styling by adding CSS classes as ...
Read more >react-input-mask - npm
Start using react-input-mask in your project by running `npm i ... There are 907 other projects in the npm registry using react-input-mask.
Read more >GitHub - sanniassin/react-input-mask
Apply mask only if value is not empty. In general, this is the most reliable solution because we can't be sure about formatting...
Read more >react-input-mask examples - CodeSandbox
Learn how to use react-input-mask by viewing and forking react-input-mask example apps on CodeSandbox.
Read more >Input Mask in React without libraries - DEV Community
Step 5: ... import React, { useState, useEffect, useRef } from 'react'; const InputMask = () => { const [card, setCard] = useState();...
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
Give it a try with the latest release (
reactstrap@5.0.0-beta
) https://stackblitz.com/edit/reactstrap-v5beta-input-mask?file=Example.jsUsing the latest version of those libs, it is possible to use them together. react-hook-form requires a ref on the input, and react-input-mask allows you to get a ref using
inputRef
. Supplying the ref provided by react-hook-form toinputRef
does the trick. https://stackblitz.com/edit/reactstrap-v5beta-input-mask-ch8dsm?file=Example.js