Discussions

Ask a Question
Back to All

JPList filter by Date picker input

Hi,
We use Web Api to load data, where it have StartDate & EndDate field.
By default it load all data, and allowing users to filter by StartDate & EndDate.

We've been struggle on how to use the Input filter for Date.

Have tried couple thing, also tried to use jQuery-UI Date picker, but it's still not working:

<input data-path=".StartDate" type="date" value="" data-datepicker-func="datepicker" data-datetime-format="{month}-{day}-{year}" data-control-type="date-picker-filter"
data-control-name="StartDate" data-control-action="filter" />

Is there a sample of how to Filter by date?

Admin

Hi,
This is jplist related and JPlist website is ofline but you can find exemples on there github :

https://github.com/1rosehip/jplist/blob/master/demo/5-jquery-ui-date-picker-filter-demo.html
https://github.com/1rosehip/jplist/blob/master/demo/5-jquery-ui-date-picker-range-filter-demo.html

I have made also a replacement of use of jplist for articles template using vuejs in place of jplist.
If you are interesed , i can share it.

Already tried it, and it didn't work properly.

It would be nice if you can share the template that use vuejs.

Hey Sacha... Do you happen to have any open-source examples of using VueJS instead?

Admin(edited)

So to give you some info on the future of opencontent. There a beta of OpenContent 5 Ready with a new form editor/builder components based on vuejs (in place of alpacajs). This use also Bootstrap 4. For this a new github repository is setup with templates for this new Editor. And there you will find a new articles templates based on vuejs (in place of jplist). But it work only with the new editor.

https://github.com/sachatrauwaen/OpenContent-Templates2

Admin

Here also another simple exemple of the use of vuejs in opencontent : https://github.com/sachatrauwaen/OpenContent-Templates/tree/master/VueStarter

Thank you Sacha, it's really helpful.

And also I can see that the REST API v1 is supporting many filter Operator, such as GREATER_THEN and LESS_THEN that we can use for Date Filtering, which is what we're looking for.

This comment has been deleted

ο»Ώ