Coder Social home page Coder Social logo

Comments (7)

noelrocha avatar noelrocha commented on May 18, 2024

It looks like doesn't accept the spaces. Anyone with a good solution?

from jquery.payment.

firecall avatar firecall commented on May 18, 2024

Workaround: Use a jQuery masking plugin, or if using bootstrap, the JASNY extensions have a masking plugin.

from jquery.payment.

edlebert avatar edlebert commented on May 18, 2024

This is a huge issue. Not only does the formatting not work, for some reason it adds a space to the beginning of the CVC field when you focus on it for the first time.

from jquery.payment.

edlebert avatar edlebert commented on May 18, 2024

This is related to a chromium bug where the keycode is always zero for keyup/keydown events. But that bug has been open for over a year, soooo... I don't know if/when chromium will ever fix it.

from jquery.payment.

edlebert avatar edlebert commented on May 18, 2024

This appears to be the related chromium issue: https://code.google.com/p/chromium/issues/detail?id=118639

from jquery.payment.

SeanLS avatar SeanLS commented on May 18, 2024

The following lines need to be updated (add input as event type for android support Lines 367 to 390):

$.payment.fn.formatCardCVC = function() {
this.payment('restrictNumeric');
this.on('keypress input', restrictCVC);
return this;
};

$.payment.fn.formatCardExpiry = function() {
this.payment('restrictNumeric');
this.on('keypress input', restrictExpiry);
this.on('keypress input', formatExpiry);
this.on('keypress input', formatForwardSlash);
this.on('keypress input', formatForwardExpiry);
this.on('keydown input', formatBackExpiry);
return this;
};

$.payment.fn.formatCardNumber = function() {
this.payment('restrictNumeric');
this.on('keypress input', restrictCardNumber);
this.on('keypress input', formatCardNumber);
this.on('keydown input', formatBackCardNumber);
this.on('keyup input', setCardType);
this.on('paste input', reFormatCardNumber);
return this;
};

$.payment.fn.restrictNumeric = function() {
this.on('keypress input', restrictNumeric);
return this;
};

from jquery.payment.

jamesreggio avatar jamesreggio commented on May 18, 2024

Fixed in #102 and available in v1.1.0.

https://github.com/stripe/jquery.payment/releases/tag/v1.1.0

from jquery.payment.

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.