1var formattedDate = new Date("yourUnformattedOriginalDate");
2var d = formattedDate.getDate();
3var m = formattedDate.getMonth();
4m += 1; // JavaScript months are 0-11
5var y = formattedDate.getFullYear();
6
7$("#txtDate").val(d + "." + m + "." + y);