1

I am using Angular UI grid and I have a date column in which I need to have a filter that filters between start and end date without any date picker

Looking at that example, I tried adding type:'date' to the column definition, however the grid still doesn't filter out rows before the date typed into the 'from...' filter box and after the date typed into the 'to...' filter box.

Anything that I am missing something ?

 {  field: 'mixedDate',
    type: 'date',
    width: '15%',
    cellFilter: 'date:"mediumDate"',
    filters:[
    {
     condition: uiGridConstants.filter.GREATER_THAN,
     placeholder: 'greater than'
   },
   {
    condition: uiGridConstants.filter.LESS_THAN,
    placeholder: 'less than'
  }]}

I'm looking for functionality like the Age column here: http://ui-grid.info/docs/#/tutorial/103_filtering except with dates instead of numbers.

Munna S
  • 17
  • 6
  • The API doesn't provide a `filerName` property, have you tried removing it? – AranS Jun 18 '16 at 11:09
  • yes i have tried by removing that too .. {field: 'mixedDate', type: 'date', width: '15%', cellFilter: 'date:"mediumDate"', filters:[ { condition: uiGridConstants.filter.GREATER_THAN, placeholder: 'greater than' }, { condition: uiGridConstants.filter.LESS_THAN, placeholder: 'less than' }]} – Munna S Jun 18 '16 at 11:55
  • Please check this plunker : i have added the date filter but when i am manually putting the date its not working : http://plnkr.co/edit/0MIf9QE3LsPFWCWPyDMZ?p=preview – Munna S Jun 19 '16 at 12:02
  • this link https://github.com/angular-ui/ui-grid/issues/2321 talks about using custom filters – Pratik Bhat Jun 19 '16 at 15:47
  • I created custom date filtering using bootstrap modals with datepickers inside them, if that helps you. See [this previous stackoverflow answer](http://stackoverflow.com/questions/31588622/angular-js-ui-grid-custom-date-filter/36946601#36946601). – Bennett Adams Jun 21 '16 at 16:25
  • i have finally done it ... check my plunker : http://plnkr.co/edit/0MIf9QE3LsPFWCWPyDMZ?p=preview – Munna S Jun 21 '16 at 18:12

0 Answers0