I have this code: <!doctype html> <html lang="es"> <head> <meta charset="utf-8"> <title>Test </title> <link rel="stylesheet" href="css/jquery-ui.min.css"> <link rel="stylesheet" href="css/bootstrap.min.css"> <script src="js/jquery.js"></script> <script src="js/jquery-ui.min.js"></script> <script src="js/bootstrap.min.js"></script> <script> $(function() { $( "#datepicker" ).datepicker(); }); </script> </head> <body> <p>Date: <input type="text" id="datepicker"></p> <h1>Hola</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aperiam, possimus veniam porro maxime, ipsam quia dolores omnis mollitia quasi illum dolor eos veritatis cumque incidunt delectus vel consequuntur nesciunt aliquid. </p> <button class="btn btn-primary">Botón</button> </body> </html> HTML: It works, but before the scripts bootstrap and jquery was in body. But when I insert jquery-ui.js doesnt work in body but it works in head. Is correct this setting?
If jQuery ui doesn't work before /body you're doing something wrong. I'm guessing (no, I'm not guessing, I know) that it's because you're not actually declaring document ready before calling datepicker. Besides, the code for the page is gibberish (you have an input without a form, wrapped in a p-element. You're also using bootstrap: why?
Well this code is a example, for that not has a form, I am going to use bootstrap for that is there. And my mistake was the wrong release from jquery.