Politespace Versions Save

Politely add spaces to numeric form values to increase readability (credit card numbers, phone numbers, etc).

v1.0.0

6 years ago

Attribute Changes

All data attributes are now prefixed with data-politespace-. They will need to be updated to work correctly. Changes include:

  • data-politespace-grouplength
  • data-politespace-delimiter
  • data-politespace-reverse
  • data-politespace-decimal-mark

Auto-initialization

Auto-initialization code has been moved into a separate file, to make it optional. If you want the component to scan the DOM for politespace inputs and initialize them automatically, include the politespace-init.js file. Optionally, you can call $("[data-politespace]").politespace(); manually.

Milestone

v0.1.4

8 years ago
  • Fixes issue with long values bleeding out of <input type="number"> fields.
  • Fixes maxlength inconsistencies with formatted values.

v0.1.2

8 years ago

Adds support for input type="number" and data-delimiter.

  • input type="number" is important to trigger numeric keyboards on Android and Mobile Firefox.
  • data-delimiter allows you to use a different character instead of a space.

v0.1.3

8 years ago
  • Adds a data-reverse attribute to apply grouplengths from right to left (useful for money fields, where "$1234" shouldn’t transform to "$1,234".
  • Politespace can now be used for non-numeric input as well. For example, Canadian Postal Codes include alphabetic characters.

v0.1.1

10 years ago

Fixes bug with removal of spaces on focus.

v0.1.0

10 years ago

This is the initial release.