Fix date parsing in firefox

This commit is contained in:
yflory 2021-06-01 13:54:04 +02:00
parent 6021b15213
commit ce6879fd68

View file

@ -472,7 +472,12 @@ define([
} else {
$container.find('input').each(function (i, el) {
var val = $(el).val().trim();
if (v.type === "day" || v.type === "time") { val = +new Date(val); }
if (v.type === "day" || v.type === "time") {
var f = el._flatpickr;
if (f && f.selectedDates && f.selectedDates.length) {
val = +f.selectedDates[0];
}
}
if (values.indexOf(val) === -1) { values.push(val); }
else { duplicates = true; }
});