how to apply cleave.js format for multiple input with one class
See original GitHub issueSo, a question in a title. I have a problem, I have some inputs in form with class ‘date’ code works fine, but it works for first input (for the first got the top down with that class)
var cleave = new Cleave('.date', {
date: true,
datePattern: ['d', 'm', 'Y'],
delimiter: '.'
});
how can I use this code for multiple inputs without dublicating code applying it by selector ‘#elemname’ need to apply it to all by class ‘.date’
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Why can't I establish two cleave.js formatted fields in the same ...
I've tried a few remixes of this including assigning the Cleave objects to variables and declaring them in the same function, but no...
Read more >Format Input Fields Automatically with Cleave.js - Hongkiat
Think about all the different input fields that require a formatted structure. Phone numbers, credit cards, birth dates, street addresses...
Read more >Input Formatting with Cleave.js - Medium
Cleave is a JavaScript library that handles the formatting of input values, in a clean and easy to implement pattern, so that you...
Read more >Auto-formatting input text content with cleave.js - YouTube
In this video you will learn how to automatically format you input content when you are typing. Download Cleave. js : ...
Read more >cleave.js - Format Examples - CodePen
2. <section>. 3. <p>Credit card detector (<span class="type">unknown</span>): </p> ... <input class="input-1 right" /> ... <p>Use multiple delimiters:</p>.
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 FreeTop 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
Top GitHub Comments
I ended up using
from http://stackoverflow.com/questions/40637035/why-cant-i-establish-two-cleave-js-formatted-fields-in-the-same-js-file
If you want to use it without jQuery, Here is how it can be done