date format set in javascript dd MMM yyyy code example
Example 1: js date format yyyy-mm-dd
yourDate.toISOString().split('T')[0]
Example 2: javascript date format mm/dd/yyyy
var date_format = new Date();
document.write(innerHTML = date_format.getMonth()+'/'+ date_format.getDate()+'/'+date_format.getFullYear());