Giter VIP home page Giter VIP logo

Comments (15)

dm4t2 avatar dm4t2 commented on September 10, 2024 8

Good news: In the next release (probably 1.19.0) the requirement for Intl.NumberFormat.prototype.formatToParts() will be dropped again.

from vue-currency-input.

dm4t2 avatar dm4t2 commented on September 10, 2024 4

Release 1.19.0 is now available 🤤

from vue-currency-input.

dm4t2 avatar dm4t2 commented on September 10, 2024 1

Thanks for your suggestion. I will add it in the docs.

Good news: IE11 will be supported in the next release (1.6.0) 🎉

from vue-currency-input.

dm4t2 avatar dm4t2 commented on September 10, 2024 1

Hi, since 1.18.0 browser support for Intl.NumberFormat.prototype.formatToParts() is required or needs to be polyfilled.

Adding the following snippet to your main.js should work:

if (!Intl.NumberFormat.prototype.formatToParts) {
    Intl.NumberFormat = require('intl').NumberFormat;
    require('intl/locale-data/jsonp/<your locale>')
}

You can also use a version < 1.18.0 if you don't need support Arabic/Persian numbers.

from vue-currency-input.

nPaul avatar nPaul commented on September 10, 2024 1

Good news: In the next release (probably 1.19.0) the requirement for Intl.NumberFormat.prototype.formatToParts() will be dropped again.

Please faster :D
my users with safari 10 are indignant

from vue-currency-input.

dm4t2 avatar dm4t2 commented on September 10, 2024

Hi,
the plugin will work in Edge if you add

transpileDependencies: ['vue-currency-input']

to vue.config.js (see https://cli.vuejs.org/config/#transpiledependencies).

IE11 is currently not supported,

from vue-currency-input.

rfvizarra avatar rfvizarra commented on September 10, 2024

Hi,

thanks for the information about how to fix the issue with Edge, it worked flawlessly.

May I suggest to add that information to the web page, including the information about browser support?

So I guess it was not a bug after all.

Thanks again.

from vue-currency-input.

dm4t2 avatar dm4t2 commented on September 10, 2024

IE11/Edge are now fully supported in release 1.6.0.
The transpileDependencies config is no longer needed.

from vue-currency-input.

truongx avatar truongx commented on September 10, 2024

Most of all - thank you for your work.

Everything runs flawlessly in other browsers, but in IE11 (v11.778.18362) I have trouble making it work, so I'm reusing this issue. In dev mode I get the following errors:

Error in created hook: "TypeError: Object doesn't support property or method 'formatToParts'"
Error in directive currency bind hook: "TypeError: Object doesn't support property or method 'formatToParts'"

I thought it's caused by the lacking implementation of Intl in IE11, so I added the polyfills, but it didn't help. Perhaps i'm missing something simple here.

The Playground site doesn't work in IE11 either (any characters can be typed inside the input).

from vue-currency-input.

truongx avatar truongx commented on September 10, 2024

Worked like a charm, thank you 😁

from vue-currency-input.

njzah avatar njzah commented on September 10, 2024

Hi, I also have same issue in IE11. Do you have CDN for version less than 1.18.0.

from vue-currency-input.

bkarlson avatar bkarlson commented on September 10, 2024

Is there any way to use polyfill with dynamic locale values, i.e. based on user preferences / browser locale?

from vue-currency-input.

bkarlson avatar bkarlson commented on September 10, 2024

maybe a bundle w/o arabic numbers support can be a compromise for those who need slightly wider browser compatibility, but don't want to miss on latest vue-currency-input bugfixes..

from vue-currency-input.

dm4t2 avatar dm4t2 commented on September 10, 2024

Hi, I also have same issue in IE11. Do you have CDN for version less than 1.18.0.

Use https://unpkg.com/[email protected]

Is there any way to use polyfill with dynamic locale values, i.e. based on user preferences / browser locale?

What about using navigator.language?

maybe a bundle w/o arabic numbers support can be a compromise for those who need slightly wider browser compatibility, but don't want to miss on latest vue-currency-input bugfixes..

No, sorry! Please use the polyfill if you need to support zombie browsers like IE11.

from vue-currency-input.

bkarlson avatar bkarlson commented on September 10, 2024

@dm4t2, I checked and apart from IE11, up to 3-4% of other browsers (Chrome < 64, Safari < 11 or even 12, Edge < 18 etc), do not support formatToParts(). Also, the polyfill itself is unmaintaned and its issues list looks scary.

As for dynamic locale imports, my concern was not about detecting locale, but about dynamically pulling necessary jsonp upon detection... it might be that webpack 4 can do it natively for require, I will explore this later.

from vue-currency-input.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.