Coder Social home page Coder Social logo

rajaramtt / jquery-input-mask-phone-number Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 17.0 20 KB

jquery-input-mask-phone-number.js - A simple, easy jquery format phone number mask library

HTML 100.00%
jquery jquery-plugin masking jquery-input-mask phone-format javascript-library javascript phone-number phone jquery-library

jquery-input-mask-phone-number's Introduction

Raja Ram T

I'm a Technical Lead. I spend every day enthusiastically to learn new technologies, experimenting with Angular, Express.js, React, HTML, CSS, JavaScript, Bootstrap, and Material Design.

Having started my career as a LAMP Stack developer, After successfully developed a Couple of Projects, I enthusiastically started learning new technologies and developing the best Industry coding standards MEAN Stack Rich Internet Applications (RIA).

I’m curious, and I enjoy work that challenges me to learn something new and stretch in a different direction. I do my best to stay on top of changes in web technologies so that I can meet challenges with frameworks and tools well suited to the job at hand.

If you’d like to get in touch, feel free to say hello through any of the social links below.


Connect with me:

rajaramtt rajaramtt rajaramtt




Github Trophies

Top Langs

GitHub stats

GitHub streak stats

jquery-input-mask-phone-number's People

Contributors

derekmckinnon avatar rajaramtt avatar rajathavalam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jquery-input-mask-phone-number's Issues

Entering number with 1 (country code) loses final number

Many people enter their phone number including the initial 1 (ex: 1-212-123-4567)
If someone does that it will only take the first 10 digits and drop the last digit.
Is there any way to set it to remove the initial 1 if they start the number with 1?

Keying back and deleting at "-" breaks mask

Trying this library out for robustness. After entering in a number, if someone hits their arrow key back to a "-" and hits delete this library deletes the "-".

Instead hitting delete should gracefully shift the numbers back without affecting the dashes (minus removing them if there are not enough numbers.

Screen Shot 2019-11-26 at 2 31 55 PM

Tab out from input not working

After initiating this call, the tab out functionality is no longer working
$('#txtPhone').usPhoneFormat({
format: '(xxx) xxx-xxxx'
});

Newest build has logic error

The current program has an issue where validation checks are being done after input. So i can type characters as well as numbers and go over the normal phone number limit.

However, using this version 1.0.11 posted at npmjs.com works flawlessly.

I can see comparing the 2 files that the difference is on line 33 and 48

33$(this).on('keyup', function (e) { most recent on github
33$(this).on('keydown touchend', function (e) { version 1.0.11 posted at npmjs.com
48$(this).on('keyup', function (e) { most recent on github
48$(this).on('keydown touchend', function (e) { version 1.0.11 posted at npmjs.com

The only downside i noticed when using 1.0.11 on npmjs is that ctrl + v to paste numbers won't work however, right click and paste still does.

Ideally you might wan't to handle both issues somehow.

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.