ui-grid (3.0.0-rc.16) doesn't work well when using filtering dates. Filtering on other fields works well.
Here comes a punker:
http://plnkr.co/edit/b9NSk0
Try to start entering 2014 for any date.
Bug or I missed something?
// main.js
var app = angular.module('myApp', ['ui.grid', 'ui.grid.i18n']);
app.controller('MyCtrl', function($scope) {
$scope.myData = [{
eventName: "event1",
eventDateRaw: new Date(1416396274368),
eventDateFormatted: new Date(1416396274368)
}, {
eventName: "event2",
eventDateRaw: new Date(1416352423803),
eventDateFormatted: new Date(1416396274368)
}];
$scope.gridOptions = {
data: 'myData',
columnDefs: [{
name: 'eventName', width: "20%"
}, {
name: 'eventDateRaw', width: "40%"
}, {
name: 'eventDateFormatted', width: "40%",
cellFilter: 'date: "yyyy-MM-dd HH:mm:ss.sss"'
}],
enableFiltering: true
};
});
br remy44
Try and add a type:
{
name: 'eventDateFormatted', width: "40%",
cellFilter: 'date: "yyyy-MM-dd HH:mm:ss.sss"',
type: 'date'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With