Adding days to a date - date getting converted to string
<p>So I'm trying to add a certain number of days to a date, and I'm getting a strange issue:</p>

<pre><code>var date = new Date();

var newdate = date.getDate() + $('#ddlDays option:selected').val();

date.setDate(newdate);
</code></pre>

<p>So if today is 09/29/2010, the Date is 29. But if a user selects "5" from ddlDays, it will assume I am adding strings together, adding 295 days to my date.</p>

<p>I was under the impression that javascript would assume they were integers? Does getDate() return a string instead of an integer?</p>

<p>How can I fix this?</p>
