• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

83
Views
Default select option based on current month

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.

about 3 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error