Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82755

Search individual filter on standard time failing

$
0
0

Using latest version of editor datatables. I'm using pretty much the same searching filter listed here:

https://datatables.net/examples/api/multi_filter.html

Except mine are on the headers:

    // Apply the search
    tab.columns().every( function () {
        var that = this;

        $( 'input', this.header() ).on( 'keyup change', function () {
            if ( that.search() !== this.value ) {
                that
                    .search( this.value )
                    .draw();
            }
        } );

        $('input', this.header()).click(function(event) {
            event.stopPropagation();
        })
    } );

On my table server page I've converted one column from military time to standard time using this code:

Field::inst('createdTime')
->getFormatter( Format::datetime('Y-m-d H:i:s', 'Y-m-d g:i A') )
->setFormatter( Format::datetime('Y-m-d g:i A', 'Y-m-d H:i:s') )

However, when I try to perform a search such as "1:46" it does not find a row, unless I use military time "13:46". I've looked at the data being returned by the table server and it's in standard time. Am I missing something?


Viewing all articles
Browse latest Browse all 82755

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>