Datepicker with SQL?

Datepicker with SQL?

Hey Guys,

Im having difficulty trying to work this out. 

Im trying to grey out the dates that have already been entered into the database.

heres what I tried

******Database Stuff *****

[code]

  $(document).ready(function() {
    $("#datepicker").datepicker({minDate: 0,
    
         beforeShowDay: booked
      });
 
      function booked(date){
          var day = date.getDay('$grey, $grey2');
                      return [(day > 0), ''];
      };
});


[/code]

Thank in advance everyone