Coder Social home page Coder Social logo

IE compatibility? about datepicker HOT 8 CLOSED

noseboy avatar noseboy commented on July 22, 2024
IE compatibility?

from datepicker.

Comments (8)

porpoisepower avatar porpoisepower commented on July 22, 2024

I'm trying to adapt this to work with IE (since I have this problem with IE 11.)

So this is a post in process, as I work through issues. Hopefully this will be helpful to the authors of this package.

Lines 42 and 163 uses 'deconstructed object assignment' which IE doesn't support ( I had the same issue with IE 11) I replaced the line with individual assignments (
for example I replace 42 with

const startDate = options.startDate
const selectedDate = options.selectedDate)

Line 136 uses e => {...} instead of function(e){...} => is shorthand, (there's some other differences with this, but I didn't see it used in the function, so I think it'll be okay to the regular version)

from datepicker.

qodesmith avatar qodesmith commented on July 22, 2024

Hey @porpoisepower, sorry for the delayed response. You should be using the datepicker.min.js file as it has already been transpiled down to ES5 and will be compatible with IE. Let me know if that works.

from datepicker.

noseboy avatar noseboy commented on July 22, 2024

from datepicker.

qodesmith avatar qodesmith commented on July 22, 2024

@noseboy Datepicker is using a mutation observer and it looks like that's incompatible with IE < 11. But can you tell me what error you're getting with IE 11 specifically?

from datepicker.

noseboy avatar noseboy commented on July 22, 2024

from datepicker.

qodesmith avatar qodesmith commented on July 22, 2024

@noseboy Ahhh, I see. Array.includes isn't supported in IE, only in Edge. Let me make some changes to the code.

from datepicker.

qodesmith avatar qodesmith commented on July 22, 2024

@noseboy @porpoisepower Ok my friends. I've revamped the code towards being more IE friendly. There's no more mutation observer and it now includes a very small polyfill for Array.includes. I'd love to know how things work for you guys and if there's still IE errors. As always, please use the datepicker.min.js file.

from datepicker.

qodesmith avatar qodesmith commented on July 22, 2024

Closing this issue. If there's still IE troubles, don't hesitate to open another ticket.

from datepicker.

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.