Set date format (appendText: " MM/DD/YYYY")
<html lang="en">
<head>
<title></title>
<link type="text/css" href="js/themes/base/ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="js/ui/ui.core.js"></script>
<script type="text/javascript" src="js/ui/ui.datepicker.js"></script>
<link type="text/css" href="js/demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
var pickerOpts = {
appendText: " MM/DD/YYYY",
changeFirstDay: false,
changeMonth: false,
changeYear: false,
closeAtTop: false,
showOtherMonths: true,
showStatus: true,
showWeeks: true,
duration: "fast"
};
$("#date").datepicker(pickerOpts);
});
</script>
</head>
<body>
<label>Enter a date: </label><input id="date">
</body>
</html>
Related examples in the same category