Fix #1052: filter not working for date/time values

This commit is contained in:
Arik Fraimovich
2016-06-14 10:58:33 +03:00
parent 68465b0c60
commit a7af596da0

View File

@@ -174,9 +174,14 @@
}; };
return (memo && _.some(filter.current, function(v) { return (memo && _.some(filter.current, function(v) {
// We compare with either the value or the String representation of the value, var value = row[filter.name];
// because Select2 casts true/false to "true"/"false". if (moment.isMoment(value)) {
return v == row[filter.name] || String(row[filter.name]) == v return value.isSame(v);
} else {
// We compare with either the value or the String representation of the value,
// because Select2 casts true/false to "true"/"false".
return (v == value || String(value) == v);
}
})); }));
}, true); }, true);
}); });