How to format minDate for datepicker

How to format minDate for datepicker

Hello,

How do I format the minDate that goes to the datepicker.

Im getting a month and year from a previous ?datepicked? field.

And Im using the value in that field to set up a minDate thingy.

I have the below, but I cant seem to get the format correct.

SCAYEA is a 2013 field.

  1. $("#SCDATE").click(function () {          
  2. var mm = $("#SCAPER").val();              
  3. var yy = $("#SCAYEA").val();              
  4. var yymmdd = yy + '/' + mm + '/01';       
  5. var mmddyy = mm + '/01/' + yy;            
  6. $("#SCDATE").datepicker({minDate:yymmdd});
  7.   });