Filtering Option "Datetime is not Defined"

Filtering Option "Datetime is not Defined"

zgoforthzgoforth Posts: 493Questions: 98Answers: 2

Link to test case:

So originally, I had created a plugin to filter the table to only show data that contained dates in that of the current week. Here it is:

    function( settings, searchData, index, rowData, counter ) {
        var now = moment();
        var monday = now.clone().weekday(1);
        var friday = now.clone().weekday(5);
        let mondayF = monday.format('MM/DD/YYYY');
        let fridayF = friday.format('MM/DD/YYYY');
        var sMonday = searchData[2];
        var sFriday = searchData[10];
        if (mondayF == sMonday && fridayF == sFriday) {
            return true;
        return false;

It worked perfectly, but unfortunately requirements changed and now I need to be able to filter through all the data, especially so people can look back at past weeks.

I implemented, and it is giving me quite a bit of errors, as well as the calendar/date selector appear below the table? Lastly, the example searches for a value from one column, I want to find a couple of dates from the Monday-Friday columns. Like if they are in between the Monday & Friday Dates, show it.

This question has an accepted answers - jump to answer


  • colincolin Posts: 15,200Questions: 1Answers: 2,592
    Answer ✓

    DateTime is now it's own independent library, so you'll need to import those files into your app too. Alternatively, just use the Download page,


  • zgoforthzgoforth Posts: 493Questions: 98Answers: 2

    @colin thanks I forgot to add the stylesheet as well as the script... I made sure to include those, and look at how the Date Range Filter selector is below the table, and nothing happens when I enter the two dates to search for, the table doesn't filter. Meanwhile, nothing is happening in console showing me any warnings or errors:

This discussion has been closed.