Questions tagged [cleave]

Use this tag with questions concerning Cleave.js package for data entry and data formatting. Along with this tag also specify tags such as [reactjs] or [angular] or [jsfiddle] or [formik] to specify the JavaScript library being used with Cleave.

Cleave.js starting GitHub page with formatting demos.

Cleave.js documentation tree on GitHub.

27 questions
1
vote
0 answers

Cleave.js not working in tablet devices using angularjs

I am using Cleave.js for formatting the date field in my form . My Cleave format declaration is like this $scope.dobFormat = { delimiter: '/', blocks: [2, 2, 4], numericOnly: true } My Issue is after deleting the year if I retype the year . For the…
RAJ
  • 229
  • 2
  • 14
0
votes
1 answer

Cleave.js, getting the country code telephone digit for a particular country

For Anybody familiar with cleave.js out there. am I able to get the country code digit? in this case here for Italy, am I able to access the 39 for Italy? I am working on a form that will auto complete and show the country code (digits) and could…
Lucky500
  • 677
  • 5
  • 17
  • 31
0
votes
1 answer

Cleave.js in React: TypeError: Cannot set properties of undefined (setting 'element')

I have used Cleave in MANY React projects. But suddenly today it is not working in a new project. Here are my packages (so you can see versions): "dependencies": { "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", …
Nick Burczyk
  • 251
  • 1
  • 3
  • 7
0
votes
0 answers

Getting error when trying to format with cleave.js

I am getting this error: Uncaught Error: [cleave.js] Please check the element at new Cleave (cleave.js:82:16) at main.js:2:14 My js code: var cleave = new Cleave('.pinenter',{ blocks: [3], numericOnly: true }); This is my html :
mkymky
  • 1
0
votes
2 answers

Test cleave.js component with testing-library

I am trying to test a component with testing-library. The problem I'm facing is how to introduce text automatically in an input. Usually this could be achieved by: const inputName =…
Andrés
  • 719
  • 1
  • 4
  • 21
0
votes
0 answers

Updating vue input default value when combination of veevalidate and cleavejs

Hello fellow developers. I'm developing a masked birthday input in vuejs that need to check that the date is now minus 18 years, to check if my users can buy alcohol. It's working great, but i'm struggling with it when the birthday is passed as a…
Bloodbee
  • 827
  • 8
  • 23
0
votes
1 answer

How to set a default value to an element, formatted with Cleave.js?

I've tried to set default value by setting a value property: new Cleave('.cleave-input-class-name', { time: true, timePattern: ['h', 'm'] }); $(.cleave-input-class-name).value = '09:00'; Also I tried to…
majorMobilych
  • 95
  • 2
  • 6
0
votes
5 answers

Change the number format in the input text

I want to change the number format with (,) in thousands, for example 2000 to 2,000 20000 to 20,000 and so on. I have tried to browse and I found a suitable library that is cleave.js, but there is one problem in this library which is that I can…
Newbie 123
  • 254
  • 4
  • 19
0
votes
1 answer

How do I use value in Cleave JS react

I want to use Cleave js for currency format. My Cleave tag looks like this:
Rachit Gupta
  • 89
  • 1
  • 2
  • 8
0
votes
1 answer

Run js when pop over text input is loaded

Wanted to have cleave.js to format text input on the fly. I have 2 text inputs HTML text input and also a pop over text input whenever search icon is clicked. The issue is on popover text input where cleave text formating is not working.…
FRizal
  • 448
  • 7
  • 15
0
votes
1 answer

Cleave js date output is without delimiters

I'm using cleave.js for a date input field in my Vue.js project. The option that I passed was this: options="{date: true, delimiter: '/', datePattern: ['m', 'd', 'Y']}" However, the output seems to be "12121995" instead of "12/12/1995". On the…
user1012181
  • 8,648
  • 10
  • 64
  • 106
0
votes
1 answer

Php Numeral Formatting and decimal separator

i want to decimal thousand separtor with automatic in Text Input. example when write in textinput 5000, i want to automation into 5,000 i have js : var cleave = new Cleave('.input-element', { numeral: true, numeralThousandsGroupStyle:…
user6602951
1
2