Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InputMask | Prefix with number +9 #14833

Open
cetincakiroglu opened this issue Feb 19, 2024 · 3 comments
Open

InputMask | Prefix with number +9 #14833

cetincakiroglu opened this issue Feb 19, 2024 · 3 comments
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@cetincakiroglu
Copy link
Contributor

See discussion: https://github.com/orgs/primefaces/discussions/1202

Reproducer: https://stackblitz.com/edit/acnz1y?file=src%2Fapp%2Fdemo%2Finput-mask-basic-demo.html

@cetincakiroglu cetincakiroglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Feb 19, 2024
@cetincakiroglu cetincakiroglu added this to the 17.9.0 milestone Feb 19, 2024
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 19, 2024
@DanaDovzh
Copy link

But when we focus on the input and enter a number we should see the prefix "+998" instead we see "+888". It's a different phone code

@cetincakiroglu cetincakiroglu modified the milestones: 17.9.0, 17.10.0, 17.11.0 Feb 29, 2024
@cetincakiroglu
Copy link
Contributor Author

Hi,

This issue also happens in PrimeVue and PrimeReact. Because of that, we'll revisit and discuss this issue in 17.12.0 milestone next week with the team.

@cetincakiroglu cetincakiroglu modified the milestones: 17.11.0, 17.12.0 Mar 14, 2024
@cetincakiroglu cetincakiroglu removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 14, 2024
@cetincakiroglu cetincakiroglu modified the milestones: 17.12.0, 17.13.0 Mar 21, 2024
@cetincakiroglu cetincakiroglu modified the milestones: 17.13.0, 17.14.0 Apr 9, 2024
@cetincakiroglu cetincakiroglu modified the milestones: 17.14.0, 17.Future Apr 19, 2024
@byStrange
Copy link

byStrange commented Aug 27, 2024

You can use InputGroup as a solution, since the prefix is meant to be static. More about InputGroup

<script setup>
import InputGroup from 'primevue/inputgroup'
import InputGroupAddon from 'primevue/inputgroupaddon'
import InputMask from 'primevue/inputmask'
import { ref } from 'vue';

const phoneNumber = ref('');
</script>

<template>
   <InputGroup>
      <InputGroupAddon>+998</InputGroupAddon>
       <InputMask
         v-model="phoneNumber"
         mask="(99) 999-99-99"
         placeholder="(xx) xxx-xx-xx"
       />
   </InputGroup>
</template>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
Status: No status
Development

No branches or pull requests

3 participants