function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DDayDDay 

Setting "selected" attribute on select menu option

Hello,

 

I'm creating a select menu that is a list of months Jan-Dec. When my VF page is loaded I'd like the menu to default to the current month (set that option as 'selected'). I know how to get the current month in my apex code but don't know how to combine that in my VF page to set the selected option.

 

Thanks,

Dan 

DDayDDay

After more digging found the solution here:

 

http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=5110&query.id=56847#M5110