Change Currency Format
Hello, is there any way to change the format of Currency? What I have at this moment is something like 1,250.00 but I would like to have 1.250,00.
This would be the correct format for Spain and Germany for example.
Thanks in advance.
Juan
-
Hello Juan,
To achieve your requirement, here is a sample code to change the currency format, call this JavaScript event on “Blur”.
Please refer to below article for your reference.
https://medium.com/@samanthaming/format-currency-in-es6-with-intl-numberformat-f07e9b6321f9
function currency()
{
const number = $("#Currency1").val(); // Provide your currency Control internal id
var currencyvalue = new Intl.NumberFormat('de-DE', {
style: 'currency',
currency: 'EUR',
minimumFractionDigits: 2,
}).format(number);
$("#Currency1").val(currencyvalue); //Provide your currency Control internal id
}
Regards,Aravind
请先登录再写评论。
评论
1 条评论