$(function() {
$( "#id_birthday" ).datepicker({
todayBtn: "linked",
keyboardNavigation: false,
forceParse: false,
calendarWeeks: true,
autoclose: true,
dateFormat: 'yy-mm-dd'
});
});
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<title>TEST</title>
the <script>
$(function(){
$( "#datepicker" ).datepicker( {dateFormat: 'mm-dd-yy'} );
$('body').on('click', '#format2', function(){
$( "#datepicker" ).datepicker( "option", "dateFormat", 'yy' );
});
$('body').on('click', '#format1', function(){
$( "#datepicker" ).datepicker( "option", "dateFormat", 'MM' );
});
});
</script>
<p>date format: <input type="text" id="datepicker"></p>
<input type="button" id="format1" value="формат1">
<input type="button" id="format2" value="формат2">
format: 'yy-mm-dd'
Find more questions by tags JavaScriptjQuery
generally some sort of confusion with the versions of Jquery in one project a few turns. - Arlie commented on July 9th 19 at 12:54