Skip to content

Instantly share code, notes, and snippets.

@reachkamrul
Last active March 10, 2022 04:58
Show Gist options
  • Save reachkamrul/c788b99240f04a2283b260c04f75bdb8 to your computer and use it in GitHub Desktop.
Save reachkamrul/c788b99240f04a2283b260c04f75bdb8 to your computer and use it in GitHub Desktop.
//filter by current month
var myTimeout = setTimeout(myFilterFunction, 100);
var months = ("0" + (new Date().getMonth() + 1)).slice(-2)+"/";
months = "/"+months;
function myFilterFunction() {
// jQuery('select').sumo.selectItem(months.toString());
jQuery('option[value="'+months+'"]').prop("selected", true);
jQuery('.form-control').trigger("change");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment