Code Monkey home page Code Monkey logo

Comments (19)

constagorgan avatar constagorgan commented on July 28, 2024 9

Thanks for your quick reply @iamstevendao, and please excuse my lack of attention. I didn't notice that the prop name changed in the recent versions.

It works perfectly fine with inputOptions 馃槂

In case someone else needs more details, I'll leave this here:

<template>
  ...
  <vue-tel-input v-model="..."
                 @onInput="..."
                 :inputOptions="options"">
  </vue-tel-input>
</template>
<script>
  ...
  data() {
    return {
      options: { placeholder: "Some placeholder" }
    }
  }
  ...
</script>

Result:
image

image

from vue-tel-input.

iamstevendao avatar iamstevendao commented on July 28, 2024 5

@constagorgan the prop is inputOptions.placeholder, not placeholder.

from vue-tel-input.

iamstevendao avatar iamstevendao commented on July 28, 2024 1

@fbtwitter it should be working on v5.0.3

from vue-tel-input.

arieltoledo avatar arieltoledo commented on July 28, 2024 1

@constagorgan Thanks, changing Vue versi贸n and rewriting the code to worked.

from vue-tel-input.

ATselikovSnp avatar ATselikovSnp commented on July 28, 2024

you can just write <vue-tel-input v-model="phone" placeholder="12 123 45 67"></vue-tel-input>

from vue-tel-input.

iamstevendao avatar iamstevendao commented on July 28, 2024

Thanks, @ATselikovSnp

from vue-tel-input.

VIMHaos avatar VIMHaos commented on July 28, 2024

Thanks, @ATselikovSnp
You have right, in new plugin version we can change placeholder, I uses old version 1.3.9,
but in new version 2.0 not uses keyboard filter, how it's do that in old version

from vue-tel-input.

iamstevendao avatar iamstevendao commented on July 28, 2024

@VIMHaos what is the "keyboard filter" you are talking about? would you like to give me more details?

from vue-tel-input.

VIMHaos avatar VIMHaos commented on July 28, 2024

Hi, @iamstevendao
Try input text to field not number, in old version this blocked

from vue-tel-input.

iamstevendao avatar iamstevendao commented on July 28, 2024

@VIMHaos, hmm it's a good one! do you want to create a new issue for it?

from vue-tel-input.

fbtwitter avatar fbtwitter commented on July 28, 2024

I still had this error problem, using props placeholder is not working for me..

anyway how to use inputOptions.placeholder in my component ?

Thank you

from vue-tel-input.

iamstevendao avatar iamstevendao commented on July 28, 2024

@fbtwitter Can you reproduce it anywhere?

from vue-tel-input.

fbtwitter avatar fbtwitter commented on July 28, 2024

@iamstevendao , I kinda confusing with the newer version 5.02 here, while my repositories that i use before with the version of ^2.

I'm curious how the reproduce json data like this site look like
https://educationlink.github.io/vue-tel-input/

I already open that codesandbox file https://codesandbox.io/s/0yyyk45q7w?fontsize=14&module=%2Fsrc%2FApp.vue&moduleview=1 but these still a bit hard to me to implement the newer version, since i don't know how to use it correctly.

thanks

from vue-tel-input.

fbtwitter avatar fbtwitter commented on July 28, 2024

I still had this problem, where the placholder props won't running reactive as well.. until i tried to refresh the page.
those newer version are great.. hopefully the documentation for trying the new version updated sooner..

from vue-tel-input.

constagorgan avatar constagorgan commented on July 28, 2024

Hi @iamstevendao,

I bumped into the same issue as @fbtwitter.

I've upgraded to v5.0.3 as you recommended, but it seems like the placeholder is added on the wrong HTML element.

It's adding the attribute on the div element that holds the input instead of replacing the default placeholder from the input.

This is how it looks in the browser:
image

And that's how I use it in the component:
image

thanks

from vue-tel-input.

iamstevendao avatar iamstevendao commented on July 28, 2024

@constagorgan it's cool 鉁岋笍

from vue-tel-input.

arieltoledo avatar arieltoledo commented on July 28, 2024

@constagorgan Hi, I try to followed your example but Im getting inputoptions=[object Object ] instead. Thanks.

<vue-tel-input
   :only-countries="codigos_paises"
   :valid-characters-only="true" 
   :inputOptions="tel_options"
   enabled-country-code
   @input="onInput"  />
var app = new Vue ({
        el: '#page',
        data: {
                tel_options: {
                        'placeholder': "Ingrese su n煤mero de telef贸no"
                },
.....


Sin nombre

from vue-tel-input.

constagorgan avatar constagorgan commented on July 28, 2024

Hi @arieltoledo, sorry for getting back to you just now. In case you're still struggling with this problem - could you please try rewriting your JS like:

var app = new Vue ({
  el: '#page',
  data() {
    return {
      tel_options: {
        placeholder: "Ingrese su n煤mero de telef贸no"
      }
    }
  }
...

And check if you are using the latest version of vue-tel-input (5.1.0 is the current version at the time of writing this comment)

from vue-tel-input.

darrylferdinands avatar darrylferdinands commented on July 28, 2024

Is there no way to add a red asterisk at the end of the placeholder?

from vue-tel-input.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    馃枛 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google 鉂わ笍 Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.