Help with parseDate utility...

Help with parseDate utility...

Hi,

I'm fairly new to using jQuery. I'm trying to omit dates from a datepicker calendar. 
I want to omit dates by using 3 separate formats: 

   (1) day of the week
   (2) specific date
   (3) date range

Each format above can have multiple instances, for instance, I can have all Tuesdays and Wednesdays blocked off along with a specific date and a few date ranges. 

  1. $(function() {
  2. $("#datepicker").datepicker({
  3. dateFormat: 'yy-mm-dd',
  4. numberOfMonths: 3,
  5. showOtherMonths: false, 
  6. changeMonth: false,
  7. changeYear: false,
  8. minDate: 0, 
  9. maxDate: '+12M',
  10. selectOtherMonths: false,
  11. // beforeShowDay: $.datepicker.noWeekends,
  12. onDate: $.datepicker.parseDate('yy-mm-dd', '2010-10-10')

  13. });
  14. });

This is what I have right now, but I want to implement PHP code

so I was thinking more in the lines of this: 

  1. $(function() {
  2. $("#datepicker").datepicker({
  3. dateFormat: 'yy-mm-dd',
  4. numberOfMonths: 3,
  5. showOtherMonths: false, 
  6. changeMonth: false,
  7. changeYear: false,
  8. minDate: 0, 
  9. maxDate: '+12M',
  10. selectOtherMonths: false,

  11.                 //      To omit specific dates
  12. <?
  13.       $query = "SELECT * FROM exemptdates WHERE type = 'day';
  14.       while ($exemptdates = mysql_fetch_array($result(mysql_query($query))) {
  15. ?>        
  16.                         $.datepicker.parseDate('yy-mm-dd', '<?=$exemptdates[date];?>')
  17. <?
  18.       }
  19. ?>
  20. });


  21. });
The same would apply for specific days and date ranges. 

Thanks in advance!