Get current year for search option

Get current year for search option

ACosta123ACosta123 Posts: 9Questions: 3Answers: 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

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.