JavaScript getMonth() returns 50 for the month value
<p>Good morning gang.</p>

<p>I have a jQuery Datepicker object that is prepoulated using a javscript Date object, and I have getMonth() returning 50 as the month, instead of 5.  This was previously working as recent as 4/27/2012.</p>

<p>Here's the code:</p>

<pre><code>$(document).ready(function(){

$('#datepicker1').attr('readonly', 'readonly');

var press_date = new Date(); //This is the Date object that you're getting from external source

$('#datepicker1').val(press_date.getFullYear()+'-'
                     +press_date.getMonth()+1+'-'
                     +press_date.getDate());

$('#datepicker1').datepicker({
                     showAnim:'slide',showOn: 'button',
                     dateFormat : 'yy-mm-dd',
                     buttonImage: 'images/calendar.jpg',
                     buttonImageOnly: true,onSelect: function(dateText, inst) {} 
                    });
$('#datepicker').attr('readonly', 'readonly');

$('#datepicker').datepicker({
                     showAnim:'slide',showOn: 'button',
                     dateFormat : 'yy-mm-dd',
                     buttonImage: 'images/calendar.jpg',
                     buttonImageOnly: true,onSelect: function(dateText, inst) {} 
                    });
});
</code></pre>

<p>My guess is that this is a simple issue to resolve, but I haven't seen anything around the web to explain it.</p>
