We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Error modifying ej.globalize.min.js file for Brazilian currency

I changed the function tt (n, t, i) function of the ej.globalize.min.js file by changing "." by "," but numbers over one million are displayed incorrectly.

See the image: https://ibb.co/ZWdWR72

function tt(n, t, i) {
            var l = i.groupSizes || [3],
                c = l[0],
                a = 1,
                p = Math.pow(10, t),
                v = Math.round(n * p) / p,
                w;
            isFinite(v) || (v = n);
            n = v;
            var r = n + "",
                u = "",
                e = r.split(/e/i),
                f = e.length > 1 ? parseInt(e[1], 10) : 0;
            r = e[0];
            e = r.split(",");
            r = e[0];
            u = e.length > 1 ? e[1] : "";
            f > 0 ? (u = o(u, f, !1), r += u.slice(0, f), u = u.substr(f)) : f < 0 && (f = -f, r = o(r, f + 1, !0), u = r.slice(-f, r.length) + u, r = r.slice(0, -f));
            w = i[","] || ",";
            u = t > 0 ? w + (u.length > t ? u.slice(0, t) : o(u, t)) : "";
            for (var s = r.length - 1, y = i["."] || ".", h = ""; s >= 0;) {
                if (c === 0 || c > s) return r.slice(0, s + 1) + (h.length ? y + h + u : u);
                h = r.slice(s - c + 1, s + 1) + (h.length ? y + h : "");
                s -= c;
                a < l.length && (c = l[a], a++)
            }
            return r.slice(0, s + 1) + y + h + u
        }



Attachment: EJTeste_3971eb6.zip

1 Reply

KR Keerthana Rajendran Syncfusion Team November 11, 2019 09:38 AM UTC

Hi William, 
 
Good day to you. 
 
We have checked your provided application at our end. In your provided application, it is not needed to refer the ej.globalize.min.js file because, you have referred the ej.web.all.min.js file and your specified ej.culture.pt-BR.min.js file is not valid one.  Could you please ensure and use the proper culture files in your application? 
 
 
   <script src="App_Assets/js/jquery.easing.1.3.min.js"></script> 
    <script src="App_Assets/js/ej/web/ej.web.all.min.js"></script> 
    <!--<script src="App_Assets/js/ej/common/ej.globalize.min.js"></script>-->     
    <script src="App_Assets/js/ej/l10n/ej.localetexts.pt-BR.min.js"></script> 
 
Modified HTML file:  
 
 
Note: We have referred the online script files in modified application, please ensure the network connection at your end. 
 
Kindly ensure the provided solution and get back to us, if you require any further assistance on this.  
 
Regards, 
Keerthana.

Loader.
Live Chat Icon For mobile
Up arrow icon