Open Sergevia opened 7 years ago
Hello @Sergevia,
it's true that the date filter is outdated. I looked a bit into it and found two things.
datepicker
as a directive but this is deprecated.
It is uib-datepicker
now.expected
. In the old example it contains a object with 'before' and 'after' but since 1.3.6 of Angular it is a string.
From the Angular 1.3.6 changelogNamed properties in the expression object will only match against properties on the same level. Previously, named string properties would match against properties on the same level or deeper.
I wanted to create a Smart-Table binding for my date range picker, but i don't know when i have time again to create this extension
Hello @Sergevia,
just to inform you i added the Smart-Table support to my date range picker.
If you prefer to use the selection type from the example with two input fields you can copy the filter(filter) overrides from my part and adjust the datepicker with uib-datepicker.
I didn't test it but i think it should work just fine.
Btw. for the changes from 1.3.6 it looks like the Filter(filter ) can't handle a date object properly anymore or i'm stupid, I don't know. But it will work with a formatted date like "2017-08-28" or what ever you prefer
I would like to also add that on global searching if the original date object does not contain the string you are searching for it will return null. So example if I pipe a date object 2017-11-06T17:55:13.537Z
to get a pretty format Nov 6th, 2017
I am not able to search for Nov
, however, I can search for 11-06
and return the right data. When the table becomes null from the bad search, even after deleting the search string in the input field, the table does not recover from this. This occurs when a date object is being searched specifically, and returns null. The table will recover on a global search.
st-search
== recoverable
versus
st-search="dateCreated"
!= recoverable
Hello, Could someone update the Date Filter in the documentation, because is obsolete and the plunker does not work anymore with the latest AngularJs/UI-Boostrap?
By eg I have the following:
There is a solution on the SO, but is it the optimal one? ...