jquery datepicker refresh method is not working
<p>I am highlighting some days in a month depending on the data coming from backend . When i cahnge month or year , again am calling ajax call . But datepicker shows only previous dates . My code is as follows,</p>

<pre><code>$("input.dC").live('click',function() {
$(this).datepicker({
showOn:'focus',
changeMonth:'true',
changeYear:'true',
onChangeMonthYear:function(year,month,inst) {
                    var date = new Date(year,month-1);
                    obj.suggestDates(date);
                    $("#"+inst.id).datepicker("refresh");
},
beforeShowDay:function(date){
                for(i=0;i&lt;obj.r.length;i++) {
                  var m = obj.r[i];
                  if(date.getMonth() == m[1] &amp;&amp; date.getDate() == m[0] &amp;&amp; date.getFullYear() == m[2]) { return[true,"ui-state-highlight"];}
                }
                return[false,""];
}
}).focus();
});


obj.prototype.suggestDates=function(d){
//ajax call here 
//obj.r=response;
}
</code></pre>
