I am just trying to achieve a simple thing, to get the current date as "dd-mm-yyyy" or "mm-dd-yyyy", so am using this:
var date = new Date();
$("#datefield").val(date.toLocaleDateString());
in IE it's giving the date using this format: "Day, Month d, yyyy" in Chrome it's giving the date using this format: "m/d/yyyy"
How can I achieve the format that I need for all browsers?