Can I use 2 dates in datatables search field for multiple keyword search?

Can I use 2 dates in datatables search field for multiple keyword search?

dt_userdt_user Posts: 51Questions: 16Answers: 0

Good night,
I have been trying to find a way to make datatables search field bring up records based on multiple keywords. I found where someone else had the same problem as me and they used this site: https://datatables.net/reference/api/search() using regex.
I created the regular expression to bring up records based on 2 names as keywords and 2 dates as keywords. The names work fine but when I try to use dates as the keyword I get this message:No matching records found.

dt_history = $('#historytbl').DataTable({
          destroy: true,
          search: {regex: true},
          searchHighlight: true
});

$('.form-control .form-control-sm').on('keyup', function(){
         var pattern ="/^[A-Za-z] | [A-Za-z] | [0-9]{4}-[0-9]{2}-[0-9]{2} | [0-9]{4}-[0-9]{2}-[0-9]{2}$/";
           dt_history.column([0,2]).search(pattern, true, false).draw();
         });

Answers

This discussion has been closed.