You need to sign in to do that
Don't have an account?
Disable the past months in the dropdown
I need to disable the past months in the dropdown so that user can only select the current month and future month as the criteria for searching on Visual Force page. Any help will be greatly appreciated.
<apex:selectList value="{!month}" multiselect="false" size="1">
<apex:selectOption itemValue="1" itemLabel="January" />
<apex:selectOption itemValue="2" itemLabel="February" />
<apex:selectOption itemValue="3" itemLabel="March" />
<apex:selectOption itemValue="4" itemLabel="April" />
<apex:selectOption itemValue="5" itemLabel="May" />
<apex:selectOption itemValue="6" itemLabel="June" />
<apex:selectOption itemValue="7" itemLabel="July" />
<apex:selectOption itemValue="8" itemLabel="August" />
<apex:selectOption itemValue="9" itemLabel="September" />
<apex:selectOption itemValue="10" itemLabel="October" />
<apex:selectOption itemValue="11" itemLabel="November" />
<apex:selectOption itemValue="12" itemLabel="December" />
Use following class for your VF page
VF page:
Apex class:
write method for set selected month(enabled month) using follow code stuff
-Suresh