I just need to display "today's date" in one of my textboxes that is readonly in the form of "mm/dd/yyy" and I have no clue how to do so. Please help, thank you
Printable View
I just need to display "today's date" in one of my textboxes that is readonly in the form of "mm/dd/yyy" and I have no clue how to do so. Please help, thank you
Try this way:
getDate(): Returns the dateCode:<script type="text/javascript">
var d = new Date();
var curr_date = d.getDate();
var curr_month = d.getMonth() + 1; //months are zero based
var curr_year = d.getFullYear();
document.write(curr_date + "/" + curr_month + "/" + curr_year);
</script>
getMonth(): Returns the month
getFullYear(): Returns the year
Source: http://stackoverflow.com/questions/1...-in-javascript
:wave: