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.

6
  • The API doesn't provide a filerName property, have you tried removing it? Commented Jun 18, 2016 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' }]} Commented Jun 18, 2016 at 11:55
  • Please check this plunker : i have added the date filter but when i am manually putting the date its not working : plnkr.co/edit/0MIf9QE3LsPFWCWPyDMZ?p=preview Commented Jun 19, 2016 at 12:02
  • this link github.com/angular-ui/ui-grid/issues/2321 talks about using custom filters Commented Jun 19, 2016 at 15:47
  • I created custom date filtering using bootstrap modals with datepickers inside them, if that helps you. See this previous stackoverflow answer. Commented Jun 21, 2016 at 16:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.