Search input select option selected by default

Search input select option selected by default

tjb1013tjb1013 Posts: 1Questions: 1Answers: 0

I've got a table that contains 10 years of students, by graduating year. I'd like to default to showing only the current year's students, which is easy enough with the search and draw methods. I can't get the dropdown list to select the current year by default, though.

The select box is serving as the column header, and it should default to the year that's being shown.

I've tried various jQuery techniques (such as $("#gradClass").val(2017).change(); - tried inside and outside of functions, with the option value as numbers and strings, using classes instead of IDs, etc).

Any suggestions for me?

Answers

  • Tom (DataTables)Tom (DataTables) Posts: 139Questions: 0Answers: 26

    Hi

    Could you link me the code you are having problems with, I can take a look for you.

    Thanks

    Tom

This discussion has been closed.