Unable to select date fom jquery calender
<p>I am using jquery calender with following modifications but unable to select date .please Help i dont want any change in looks .</p>

<pre><code>&lt;script&gt;
          $(document).ready(function() {
            $(".datepicker").datepicker( {
                yearRange: '1900:2012',
                changeMonth: true,
                changeYear: true,
                showButtonPanel: true,
                dateFormat: 'dd MM yy',
                onClose: function(dateText, inst) { 
                    var day = $("#ui-datepicker-div .ui-datepicker-day :selected").val();
                    var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
                    var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
                    $(this).datepicker('setDate', new Date(year, month, 1));
                },
                beforeShow : function(input, inst) {
                    if ((datestr = $(this).val()).length &gt; 0) {
                        year = datestr.substring(datestr.length-4, datestr.length);
                        month = jQuery.inArray(datestr.substring(0, datestr.length-5), $(this).datepicker('option', 'monthNames'));
                        $(this).datepicker('option', 'defaultDate', new Date(year, month, 1));
                        $(this).datepicker('setDate', new Date(year, month, 1));
                    }
                }
            });
          });
          &lt;/script&gt;
</code></pre>
