question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add currency option to Money field type

See original GitHub issue

It currently formats using $ which is no good for anyone on a different currency.

While this could be replaced by specifying a different format string, it would be nice to have an explicit currency option that changes the default.

Alternatively, we could implement language support from numeraljs and set / use its global language instead - this is worth looking into.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JohnCLocommented, Feb 11, 2017

looks like the new numeral update broke the old functionality, by renaming “language” to “locale”

   if (this.currency) {
		try {
			numeral.locale(this.currency, require('numeral/locales/' + this.currency));
			numeral.locale(this.currency);
		} catch (err) {
			throw new Error('FieldType.Money: options.currency failed to load.');
		}
	}
0reactions
adsp16commented, Aug 13, 2019

Still cant use pounds as a format string, only defaults to $

Read more comments on GitHub >

github_iconTop Results From Across the Web

Format numbers as currency - Microsoft Support
In the Format Cells dialog box, in the Category list, click Currency or Accounting. Format Cells dialog box. In the Symbol box, click...
Read more >
html5 input for money/currency - Stack Overflow
For an input field for currency/money, it is recommended to use input type of number and specify appropriate attributes as outlined above.
Read more >
Currency Fields overview, how to configure
Currency is a type of field and an Entity. · One currency field needs four fields to work properly. · Exchange rates are...
Read more >
Use currency fields on a form - Finalsite Support
To set this up, add a text field (under the Standard Elements library) to your form. Open the element options and check the...
Read more >
Microsoft Access tips: Currency format - Allen Browne
Currency format · Create a table with a field of type Currency. · In the lower pane of table design view, set the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found