jQuery UI Datepicker Example #1 (works)

Created For: http://stackoverflow.com/q/10961976/352449

HTML

<link rel="stylesheet" href="http://code.jquery.com/ui/1.8.20/themes/base/jquery-ui.css">
<input type='text' id='txtDate' readonly='true' />
<input type='button' id='btnConvert' value='Convert' /><br/>
Current Date : <span id='spnCurrentDate'></span><br/>
Next Month Date : <span id='spnNewDate'></span>

JavaScript

$("#txtDate").datepicker({
    changeMonth: true
});

$("#btnConvert").click(function(){
var date1 = new Date($("#txtDate").val());
 date1.setMonth(date1 .getMonth() + 1);

$("#txtDate").datepicker("setDate", date1 );

});