Comments (5)
Thanks for reporting. Fix released in v19.2.7.
from intl-tel-input.
@jackocnr Alright, what the hell, that fix was so fast, thanks
from intl-tel-input.
For example the version:
import { component$, useSignal, useStore, useStyles$, useVisibleTask$ } from '@builder.io/qwik'
export default component$(() => {
useVisibleTask$(() => {
var input = document.querySelector('#phone')
window.intlTelInput(input, {
utilsScript: 'https://cdn.jsdelivr.net/npm/[email protected]/build/js/utils.js',
formatOnDisplay: true,
countrySearch: false,
})
})
return (
<>
<input type="text" id="phone" class="bg-gray-700 text-white" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/build/css/intlTelInput.css" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/js/intlTelInput.min.js"></script>
</>
)
})
Has the working search but It does not format the numbers, so what can I do?
from intl-tel-input.
Version 19.1.0 is when I notice that it does format the number on input
from intl-tel-input.
Since we decided to use the older version, it looked prettier but it didn't support autoFormatting we did the formatting oninput:
onInput$={async (_, inputField) => {
const number = iti.value?.getNumber() as string
if (isFullString(number) && number.length > 1) {
const currentFormat =
number[0] === '+' ? intlTelInputUtils.numberFormat.INTERNATIONAL : intlTelInputUtils.numberFormat.NATIONAL
const formattedNumber = intlTelInputUtils.formatNumber(number, '', currentFormat)
iti.value?.setNumber(formattedNumber)
props.state[props.id] = formattedNumber
}
await validateInputField(inputField)
}}
from intl-tel-input.
Related Issues (20)
- Country Dropdown Hidden Mobile HOT 4
- Search country input on mobile browsers is not tapable HOT 6
- React version of intl-tel-input throws an error when unmounted HOT 2
- Format as you type nor working HOT 1
- There should be no 0 after the code in Türkiye number HOT 5
- Bug: `nationalMode` and `showSelectedDialCode` together HOT 6
- Initialization options: "i18n.countryListAriaLabel" has no effect HOT 2
- Search field not appearing within drop down HOT 4
- Uncaught Error: No country data for 'undefined HOT 23
- Send Country data to Hubspot HOT 1
- Not the correct mask for the country France HOT 2
- Showing invalid number even if the number is valid HOT 9
- initialCountry does not work if you send the country code in the upper register HOT 3
- Issue with setNumber() HOT 2
- Please make esbuild a devDependency again HOT 2
- Validation of empty phone field (mandatory phone input * ) HOT 1
- isValidNumber() passing on invalid number HOT 14
- Accessibility: Dropdown not reading country options HOT 3
- Valid Turkey number starting with some prefixes etc.0561 returns invalid number HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intl-tel-input.