zmienilem parametr dateFormat z Default: "mm/dd/yy" na yy-mm-dd niestety za wiele to nie pomoglo, probowalem tez ustawic to jako parametr wyswietlania a nie zmienna. funkcji getDate
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <link rel="stylesheet" href="/resources/demos/style.css"> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script> $( function() { var dateFormat = "yy-mm-dd", from = $( "#from" ) .datepicker({ defaultDate: "+1w", changeMonth: true, numberOfMonths: 1 }) .on( "change", function() { }), to = $( "#to" ).datepicker({ defaultDate: "+1w", changeMonth: true, numberOfMonths: 1 }) .on( "change", function() { }); try { } catch( error ) { } } } ); </script> </head> <body> <label for="from">Od</label> <input type="text" id="from" name="from"> <label for="to">Do</label> <input type="text" id="to" name="to"> </body> </html>