Q:

JQuery datepicker cannot perform date formatting

I am stuck in a simple problem.  I am using JQuery datepicker plugin.  Where I am getting probem though is in formatting its date.  It is currently showing me current date in the form of: mm/dd/yy.  I want it in: yy/mm/dd. 
What I have tried:
$("#" + contactDateTextBox).datepicker({
    defaultDate: new Date(),
    selectDefaultDate: true,
    dateformat: 'yy-mm-dd',
    minDate: new Date(),
    showSpeed: 'fast',
    showAnim: 'fadeIn'
}).datepicker("setDate", new Date());

Also:
$(".selector").datepicker({
    dateFormat: 'yy-mm-dd'
});

$("#" + contactDateTextBox).datepicker({
    defaultDate: new Date(),
    selectDefaultDate: true,
    dateformat: 'yy-mm-dd',
    minDate: new Date(),
    showSpeed: 'fast',
    showAnim: 'fadeIn'
}).datepicker("setDate", new Date());

Also tried is:
$("#" + contactDateTextBox).datepicker({
    defaultDate: new Date(),
    selectDefaultDate: true,
    dateformat: $.datepicker.formatDate("yy-mm-dd", new Date()),
    minDate: new Date(),
    showSpeed: 'fast',
    showAnim: 'fadeIn'
}).datepicker("setDate", new Date());

But I am not able to get the correct format.  Please help. 

A:

In your options, dateformat should be dateFormat (with a capital "F").  This should do the trick:
$("#" + contactDateTextBox).datepicker({
    ...
    dateFormat: 'yy-mm-dd',
    ...
}).datepicker("setDate", new Date());

