Show date with format
var date = new Date();
and i have many formats:
var one = 'yy-mm-dd'; var two = 'dd.mm.yy'; var three = 'dd/mm/yy'; var four = 'mm/dd/yy';
If you're also already using jQuery UI, there's a string formatter function in the DatePicker.
If not, use Datejs.
You will have to do it yourself by using getFullYear(), getMonth() and getDate() and combining them as you see fit (no jquery/jquery UI required).
If you are using or can use JQuery UI you can take advantage of the $.datepicker.formatDate method (that's the approach we took).
Your question has been asked (in a somehow different form) before