Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to display datepicker in bootstrap modal form but unable to display

<html lang="en">
<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.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() {
    $( "#datepicker" ).datepicker();
  } );
  </script>
</head>
<body>
 
<p>Date: <input type="text" id="datepicker"></p>
 
 
</body>
</html>


this is simple page which display date picker
but when i include all header style in my header.php and set class datepicker to modal form its not happening

What I have tried:

Modal is in my footer.php and want to display modal form datepicker in index.php with header and footer

<div id="myJodal" class="modal fade" role="dialog">
  <div class="modal-dialog">

 <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><div id="orangeBox">
    <span id="x">X</span>
</div></button>
        <h4 class="modal-title"><h3 class="text-center">Get Free Quotes</h3></h4>
      </div>
      <div class="modal-body">

<div class="col-xs-6">
          <div class="form-group">
            <label class="sr-only" for="city">Date Of Travel</label>
            <div class="input-group">
              <div class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></div>              
	      <input type="text" name="datepicker" id="datepicker" placeholder="Date Of Travel" class="form-control input" value="" required="">
            </div>
          </div>
          </div>

</div>
      </div>

      </div>

      </div



please help me to resolve the problem
Posted
Comments
Karthik_Mahalingam 13-Apr-17 0:33am    
check for any error in chrome console window.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900