lorenzofox3 / Smart-Table

Code source of Smart Table module: a table/grid for Angularjs
http://lorenzofox3.github.io/smart-table-website/
1.8k stars 513 forks source link

Smart table with two custom date filters #839

Open prataraghav opened 6 years ago

prataraghav commented 6 years ago

Hello All,

I have two date columns in my smart grid. I have a custom date filter as you can see in the plunker below on one of these columns and it works fine. The issue starts when I wanted to try to have a second date filter on the second date column that I have. I modified an existing plunker that I found on this site. The data in my case is very similar to what you can see on this plunker. The second date column is the anniversary column

I got the version with one date filter working with Angular 1.6.6 Smart table 2.1.11 Please ignore the versions that you see on this plunker

http://plnkr.co/edit/GGKGbpoiGFccc6xIs38a What is wrong with this

My questions: 1)Can you have more than have one custom date filter? - > I think so but whatever I am trying to do is getting ugly real fast. So, I am running out of options on the best way to do this? 2)Does anyone out there has an example of a working plunker that can meet the scenario that I explained above. 3) I couldn't find anything on stackoverflow that closely relates to the issue that I have here with smart grid custom date filter.

Thanks

MrWook commented 5 years ago

Hello @prataraghav just took a quick look. You have the same variable name on beforeand after for the datepicker. Just change it to query_1.before or something