Possible Duplicate:
Is there any way to change input type=“date” format?
Would we be able to change date format for inputs in html 5? Currently, my site is showing MM-DD-YYYY but I would like it to show DD-MM-YYYY.
Possible Duplicate:
Is there any way to change input type=“date” format?
Would we be able to change date format for inputs in html 5? Currently, my site is showing MM-DD-YYYY but I would like it to show DD-MM-YYYY.
I think so, in HTML there is no syntax for DD-MM-YYYY format. Refer this page . Somewhat it will help you.Or you could try this in javascript:
<script language="JavaScript">
<!-- Begin
// Get today's current date.
var now = new Date();
// Array list of days.
var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
// Array list of months.
var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
// Calculate the number of the current day in the week.
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
// Calculate four digit year.
function fourdigits(number){
return (number < 1000) ? number + 1900 : number;
}
// Join it all together
today = days[now.getDay()] + ", " +
months[now.getMonth()] + " " +
date + ", " +
(fourdigits(now.getYear())) ;
// Print out the data.
document.write(today);
// End -->
</script>