0

How to stable the jquery data picker calendar with HTML input and How can I make sure the calendar with input text box stay together?

Here is my code:

 <apex:page >      
 <script>
 $( function() {
  $( "#datepicker" ).datepicker();
  } );
 </script> 
  <p>Date: <input type="text" id="datepicker"/></p>
  </html>
 </apex:page>
2
  • Have you included jQuery and the jQuery UI and jQuery UI CSS file?
    – Dan Jones
    Commented Jun 7, 2017 at 14:54
  • @DanJones I dinn't included jQuery and jQuery UI and jQuery UI CSS file. Commented Jun 8, 2017 at 5:08

1 Answer 1

0

Based on your comment, you say you haven't included jQuery, jQuery UI or the jQuery UI CSS file.

All of these components are needed to make the $(".datepicker").datepicker(); function work. You can either upload and reference these as static resources or you can link to a CDN. The links to Google's jQuery CDN are below:

<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- jQuery UI -->
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<!-- jQuery UI CSS -->
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css" />

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .