najlepsiwebdesigner / foundation-datepicker

Foundation datepicker jQuery plugin
http://foundation-datepicker.peterbeno.com
Apache License 2.0
442 stars 269 forks source link

Not working with jQuery 3.5.1 #250

Open dwilches opened 3 years ago

dwilches commented 3 years ago

Hello,

I have a project that uses jQuery 2.1.4, and foundation-datepicker was woirking ok. But as that version of jQuery is very old (+5 yo) I tried updating to jQuery 3.5.1 and foundation-datepicker stopped working.

As I'm not familiar with the datepicker, I don't know how to troubleshoot it, but these are the 2 calls that we are doing in our code:

                    element.find("section#datepickers > div#begin")
                        .fdatepicker({
                            startDate: minDate,
                            endDate: maxDate,
                        })
                        .on("changeDate", function(event) { 
                        ....

And:

                    element.find("section#datepickers > div#begin")
                        .fdatepicker("setDate", date.toDate()).fdatepicker("update");

Also, besides jQuery we are loading jquery-migrate 3.3.2 to avoid breaking the rest of our project.

The version of foundation we are using is 5.5.1 in case it matters.

Thanks.