SearchBuilder Requires DateTime when used with dates.

SearchBuilder Requires DateTime when used with dates.

tim1955tim1955 Posts: 5Questions: 2Answers: 0

I am a newbie but steadily learning. I set up Datatables with jQuery and it is working fine.
When I tried to use DataTables on a PHP generated table I received the error "SearchBuilder Requires DateTime when used with dates.". So I changed the field in the MySQL table from type DATE to type DATETIME. But I am still getting the same error. Do I need to add a jQuery line to my initialization file shown below? If so, could someone provide an example?
Thanks for any assistance. And thanks for a superb product! It is proving very useful for our non-profit organization.
Tim

$( document ).ready(function() { $('#mytable').DataTable( { colReorder: { columns: ':not(:first-child)' }, scrollx: true, responsive: { breakpoints: [ {name: 'bigdesktop', width: Infinity}, {name: 'meddesktop', width: 1480}, {name: 'smalldesktop', width: 1280}, {name: 'medium', width: 1188}, {name: 'tabletl', width: 1024}, {name: 'btwtabllandp', width: 848}, {name: 'tabletp', width: 768}, {name: 'mobilel', width: 480}, {name: 'mobilep', width: 320} ] }, layout: { top1: 'searchBuilder', bottom2Start: 'buttons' }, buttons: ['copy', 'pdf', 'excel'] } ); });

This question has an accepted answers - jump to answer

Answers

  • tim1955tim1955 Posts: 5Questions: 2Answers: 0

    PS The date format I would like is 2024-03-22.
    Time is not needed.
    Thanks again,
    Tim

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    edited April 21 Answer ✓

    Hi Tim,

    Sorry it isn't clear, the error message means that it needs the DateTime library. You can include it from the download builder.

    Allan

  • tim1955tim1955 Posts: 5Questions: 2Answers: 0

    Many THANKS for your quick and helpful reply!
    Everything is working fine now.
    Best Regards,
    Tim in Montana USA

Sign In or Register to comment.