You need to sign in to do that
Don't have an account?
Error: Constructor not defined: [System.SelectOption].<Constructor>(Integer, Integer)
public class my6 { string Calender='cale'; public List<SelectOption> getdates() { List<SelectOption> options = new List<SelectOption>(); for(integer i=1890;i<2000;i++){ options.add(new SelectOption(+i,+i)); } return options; } public string getCalender(){ return Calender; } public void setCalender(string Calender){ this.Calender=Calender; } }
use below updated code, it will works fine.
Mark best ANSWER if its works for you..
Thanks
karthik
All Answers
use below updated code, it will works fine.
Mark best ANSWER if its works for you..
Thanks
karthik
One more thing it should display as a list..All values sholud not be displayed at a time.
add this line into declaration part so that values are in list.
http://http://sfdcsrini.blogspot.com/2014/07/how-to-use-apexselectoptions-and.html
also have a look on this link.
Hope this will help you.
Thanks
karthik