1.0.6 • Published 3 years ago

@penguin3007/currency-input v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Currency Input

Currency Input allows an easy input of currency formatted numbers based on the ECMAScript Internationalization API ( Intl.NumberFormat).

Built on Vue Currency Input and TypeScript

Guide

To use Currency Input just import component import { Index } from '../dist/currencyInput.min.js';

Init class

const inputEl = document.getElementById('currency-input')

const currencyInput = new Index(inputEl, {
    options: {
      locale: 'de-DE', //BCP 47 language tag
      currency: 'EUR' //ISO 4217 currency code
    }
  });

Functions

getValue()

To get value from Currency Input use method currencyInput.getValue() it returns Object

{
    "number": 300,
    "formatted": "300 €"
}

setValue(value) To set value use method currencyInput.setValue(value)

Options

List of options you can find here Options

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago