Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

298
Views
TypeError no detectado: jQuery(...).datetimepicker no es una función

Tengo un código para generar un selector de fecha y hora normal, pero me arroja este error Uncaught TypeError: jQuery(...).datetimepicker is not a function

¿Alguien puede ayudarme? Supongo que se debe a la disposición de los enlaces y el arranque, pero no tengo una idea clara de ello.

a continuación está mi código

 <html> <head> <link rel="stylesheet" href="jquery.datetimepicker.css"> <script src="jquery-1.8.2.min.js"></script> <!-- <script src="jquery-ui.js"></script> --> <script src="https://code.jquery.com/ui/1.13.1/jquery-ui.js"></script> <script src="jquery.datetimepicker.js"></script> <script src="jquery.validate.min.js"></script> <link rel="stylesheet" href="fonts/icomoon/style.css"> <link rel="stylesheet" href="css/owl.carousel.min.css"> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="css/style.css"> <script> $(document).ready(function() { jQuery('#datevalue').datetimepicker(); jQuery('#completed').datetimepicker(); }); </script> </head> <body> <form action="#" method="post"> <div id="AlignMainDiv"> <div class="form-group last mb-4"> <label for="date">Date</label> <input type="text" class="form-control" id="datevalue"> </div> <div class="form-group last mb-4"> <label for="username">Completed Date and Time</label> <input type="text" class="form-control" id="completed"> </div> </div> </form> </body> </html>
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Presione F11, abra la depuración de Chrome, vaya a la pestaña Red > JS y verifique si alguna de las bibliotecas js incluidas devuelve un estado 404. Tal vez escribiste mal el nombre de un script o la ruta de la URL.

También puede intentar incluir las bibliotecas directamente desde CDN:

 <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>jQuery UI Datepicker - Default functionality</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.13.1/themes/base/jquery-ui.css"> <link rel="stylesheet" href="/resources/demos/style.css"> <script src="https://code.jquery.com/jquery-3.6.0.js"></script> <script src="https://code.jquery.com/ui/1.13.1/jquery-ui.js"></script> <script> $( function() { $('#datevalue').datetimepicker(); $('#completed').datetimepicker(); } ); </script> </head>
about 4 years ago · Juan Pablo Isaza Report

0

No sé si su biblioteca datetimepicker se está cargando o no.

Puede usar el siguiente CDN.

 <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.4/build/jquery.datetimepicker.full.min.js"></script>

El siguiente código cargará la fecha de hoy y mostrará el selector de fecha al hacer clic en la entrada

 <script> $(document).on("click", "#datevalue" , function() { $(this).datetimepicker({ timepicker:false, format:"dmY","setDate": new Date(), }).focus(); }); </script>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!