Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

I need help...i have two html dropdownlist 1st is years and second is months...i need help with java-script to disable the future(upcoming) months options if the year selected is the current year but if the year selected is of the previous years enable all the options in the month dropdownlist....the dropdownlist is using the ui-multiselect widget...but the options are not being enabled please help....

here is my code:

<script>
function enable() {
var options=document.getElementById("month_selects").options;
for (var i=0, iLen=options.length; i<ilen;i++){>
options[i].disabled = false;
}
}
</script>
Posted
Updated 20-May-15 0:56am
v3

1 solution

See this : http://stackoverflow.com/a/11752235[^]

For date comparisons or conversions,you can make use of http://momentjs.com/[^]

Regards..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900