Force Search on Enter Error: Cannot read properties of undefined (reading 'toLowerCase')
Force Search on Enter Error: Cannot read properties of undefined (reading 'toLowerCase')
When search.return is set to true in the DataTables configuration, using SearchBuilder with a DateTime picker (dataTables.dateTime) on date columns triggers a JavaScript error:
Cannot read properties of undefined (reading 'toLowerCase')
As a result, SearchBuilder is unable to trigger filter. The issue also appears with other types of searches; however, in those cases pressing Enter still triggers the search. When using the calendar picker, selecting a date and pressing Enter has no effect at all.
The same behavior can be reproduced in the official example:
https://datatables.net/extensions/searchbuilder/examples/initialisation/returnSearch.html
Debugger code: ezidot
Answers
Full Error Trace
Location of the Issue
The error occurs on line 1537 of
dataTables.searchBuilder.