najlepsiwebdesigner / foundation-datepicker

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

Error update function #219

Open CharlySites opened 7 years ago

CharlySites commented 7 years ago

Hello,

I don't understand because when use update function, the date in object is not the same as the date in parameters.

My source code :

var checkout = $('#endDate').fdatepicker({
    format: 'dd/mm/yyyy hh:ii',
    disableDblClickSelection: true,
    language: 'fr',
    pickTime: true
}).data('datepicker');

var date = new Date(); // Fri Oct 13 2017 15:18:16 GMT+0200 (Paris, Madrid (heure d’été))
checkout.update(date); 

// checkout.date = Fri Oct 13 2017 17:18:16 GMT+0200 (Paris, Madrid (heure d’été))

Why date != checkout.date ??

Thanks,

Charly