I have this custom code to autoselect from <select>
the current year. The problem is that the code is for sumo.select, and actually, the <select>
is not sumo. I can't find the way to implement for none sumo options:
//filter by current year
var myTimeout = setTimeout(myFilterFunction, 100);
function myFilterFunction() {
var years = new Date().getFullYear();
jQuery('select')[0].sumo.selectItem(years.toString());
}
In the same line, how can I set the code to autoselect the current month but using a constant like this?
const month = ["Enero","Febrero","Marzo","April","May","June","July","August","September","October","November","December"];
const d = new Date();
let name = month[d.getMonth()];
Thanks.