How to use date_range filter in Cinder.Table
Hey @Rebecca Le first of all, great work with this project. Our custom hacky data table with pagination broke with some deps.update and i added this so quickly without any effort 🙌
Now i am trying to use the date time range filter but when picking any date it raises
But with the resource it works
Idk if this is the right place to ask this, should i just create a github issue?
Solution:Jump to solution
can you try main again? have just pushed another fix (and
include_time
should work properly now as well)21 Replies
Also noticed that even with the include_time option it does not appear to have it in the URL
Hello! What version are you using? I fixed a bug in that the other day
Can you try 0.2.0?
i just installed it today, its 0.2.0 :x
Ah poop
I’ll have a look
thank you 🙏
btw should date range be the default filter for all date attributes?
mine is a
:naive_datetime
and the default was a text input
just wondering because the text input generated an ILIKE
query and postgres doesnt like that
thats a good point
can you share the backtrace of the error?
yes give me a sec
can you also try cinder from main? I've pushed a fix to stop the crashing, that should log a better error as to what's actually happening
the error from the date actually is not from Postgres
right, that's the crashy I fixed - it's trying to log an error with the query but crashing when trying to log lol
that error appeared twice, and then this one
so yeah the same as PG
okay timestamps are definetly not ilike-able
this is with a date range field?
no it was the text input, with the date range im getting this
maybe because it is missing the time?
i have this option but still doesnt show up
😦
ah there we go, it's because it's a naive datetime field
fixing 🙂
Solution
can you try main again? have just pushed another fix (and
include_time
should work properly now as well)works great now 🙌
huzzah!
thank you for reporting that and verifying the fix 🙂 I'll release those fixes in a proper version
np thanks for the support 😁
the default filter type for the dates was unchanged right?
I did change it while I was in there
because text fields aren't good for date-like attributes
...at least, I thought I did
🤔
i even tried changing my type to datetime instead of naive but still it was a text input 🤔
i'll fix that too, for now
filter={:date_range}
will be fine