Я использую следующий код в программе для создания даты To и From. Я хочу изменить отображаемый формат даты (текущий формат: mm/dd/yyyy к моему требованию: dd/mm/yyyy)
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<script>
jQuery(function(){
jQuery('#startDate').datepicker({
beforeShow : function(){
jQuery( this ).datepicker('option','maxDate', jQuery('#endDate').val() );
}
});
jQuery('#endDate').datepicker({
beforeShow : function(){
jQuery( this ).datepicker('option','minDate', jQuery('#startDate').val() );
}
});
})
</script>
</head>
<body>
<p>From Date: <input type="text" id="startDate"> To Date: <input type="text" id="endDate" onchange=""></p>
</body>
</html>
Спасибо в Adv!
Вы можете использовать dateFormat: "dd/mm/yy"
внутри вашего.datepicker()
так что-то вроде
.datepicker({
dateFormat: "dd/mm/yy"
})