0

There are similar questions in stack overflow , but i didnt find answer for me .

Here is HTML code,

 <div id="datepicker"></div>

JS :

 $("#datepicker").datepicker(); 

on change the next , previous button events, i used ,datepicker option

 onChangeMonthYear:function(year, month, widget){         
    $.ajax( "/getdates",{year:year,month:month},function( data ) {
      // data = ['10/15/2014','11/15/2014']
   }); 
}

I want to enable the those dates which i got in data

i tried beforeShowDay which works onload , but i dont know how to enable/disable the calendar on every ajax request during change the month/year

ramamoorthy_villi
  • 1,939
  • 1
  • 17
  • 40
  • 1
    please refer, http://stackoverflow.com/questions/9480537/select-only-specific-dates-in-jquery-ui-datepicker-date-list-comes-from-ajax – Hardik Patel Jun 12 '14 at 13:35

1 Answers1

1

Before posting any question I prefer that you search it once then you place. please refer following link it helps, Select only specific dates in jQuery UI datepicker (date list comes from AJAX)

Community
  • 1
  • 1
Hardik Patel
  • 838
  • 5
  • 12