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

Get current year for search option

$
0
0

I need to get the current year from current date and use it in a column search, some thing like:

var currDate = new Date();
var year = currDate.getFullYear();

    searchCols: [
      null,
      { search: year, escapeRegex: false },
      null,
      null,
      null,
      null,
    ]

but I keep on getting an error "Script error. (line 0)"
Help would by appreciated.

Thanks


Viewing all articles
Browse latest Browse all 82033

Trending Articles



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