use storeEval
The example below is a fully working selenium test that matches your requirements exactly, to run it open the IDE, click on the Source tab in the main window and paste the code between the <tbody>
tag
<tr>
<td>open</td>
<td>http://www.plus2net.com/php_tutorial/date-selection.php</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>new Date().setDate( new Date().getDate() + 31);</td>
<td>date</td>
</tr>
<tr>
<td>echo</td>
<td>${date}</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>d=new Date( new Date().getFullYear(), new Date().getMonth(), new Date().getDate() + 31); d=d.getFullYear()</td>
<td>year</td>
</tr>
<tr>
<td>type</td>
<td>name=year</td>
<td>${year}</td>
</tr>
<tr>
<td>echo</td>
<td>${year}</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>d=new Date( new Date().getFullYear(), new Date().getMonth(), new Date().getDate() + 31); d=d.getMonth() + 1</td>
<td>month</td>
</tr>
<tr>
<td>select</td>
<td>name=month</td>
<td>value=${month}</td>
</tr>
<tr>
<td>echo</td>
<td>${month}</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>d=new Date( new Date().getFullYear(), new Date().getMonth(), new Date().getDate() + 31).getDate(); d= d.toString().length == 1 ? "0" + d : d;</td>
<td>day</td>
</tr>
<tr>
<td>select</td>
<td>name=dt</td>
<td>label=${day}</td>
</tr>
<tr>
<td>echo</td>
<td>${day}</td>
<td></td>
</tr>
I've added in the javascript to return a date 31 days in the future.
You can also use a combination of runScript and storeEval to get virtually anything from the page.
A question I've asked demonstrates the idea
Load an external js file containing useful test functions in selenium
Any other questions add a comment, and I'll be happy to help :)
See @icc97 comment to add zero padding to the dates.