morlandi / django-ajax-datatable

A Django app which provides the integration of a Django project with the jQuery Javascript library DataTables.net
MIT License
204 stars 64 forks source link

DateFields are not searchable #60

Closed Mike3285 closed 2 years ago

Mike3285 commented 2 years ago

Hello, I noticed that a table containing a datefield in its columns won't enable the search function on that column. if you type text into the column's searchbox, nothing will happen.

This behavior can be observer even in the example datatable provided by the readme: http://django-ajax-datatable-demo.brainstorm.it/tracks/ The problem happens only when using the search box in the column, and not with the generic searchbox that search on all the fields, nor in the custom filter added there.

immagine

morlandi commented 2 years ago

mhh, interesting. Thank you for reporting this

morlandi commented 2 years ago

@Mike3285 actually ... something did happen, and as soon as you entered a valid date (according to DATE_INPUT_FORMATS setting) the filter was applied. However, the user received no feedback during the editing, since an invalid date was simply ignored.

I just published a new version (4.4.2) where this has been fixed by clearing the table content instead