Not able to change the format of date in the datepicker

Not able to change the format of date in the datepicker

I am using the below datepicker but I am not able to change the format of the date.

$(document).ready(function() { $(document).on('click', '#mdateupto', function () { $("#mdateupto").datepicker( "option", "dateFormat","yyyy-mm-dd"); $(this).datepicker().datepicker( "show" ); }); });

Please help

Regards

Deepak Bhatia