Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Like Tree1Likes
  • 1 Post By VIPStephan

Thread: Can't get datepicker to work

  1. #1
    New to the CF scene
    Join Date
    Apr 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can't get datepicker to work

    Oke, so implementing datepicker is not that difficult. I tried it on an empty page and everything works as it should. But inside my webpage it doesn't. I have literally tried everything I could find online but withouth success. What am I doing wrong? I have wasted my entire day on this, I'm about to throw my laptop out of the window!


    Code:
    <!DOCTYPE html>
    <?php
    ob_start();
    session_start();
    include('connect.php');
    if ($_COOKIE['login']== 1){
    ?>
    <html lang="en">
      <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
    
        <title>Dashboard</title>
    
        <!-- Bootstrap core CSS -->
        <link href="css/bootstrap.css" rel="stylesheet">
    
        <!-- Add custom CSS here -->
        <link href="css/sb-admin.css" rel="stylesheet">
        <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
    	    <link rel="stylesheet" href="http://cdn.oesmith.co.uk/morris-0.4.3.min.css">
    	<!-- add styles -->
    
    <link href="css/ui-lightness/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" type="text/css" />
    
    <!-- add scripts -->
    
    <script src="js/jquery.191.js"></script>
    <script src="js/jquery-ui-1.9.2.custom.min.js"></script>
    
    
    		  <script type="text/javascript" src="js/jquery.min.js"></script>
           <script type="text/javascript" src="js/jquery-ui-1.10.4.custom.min.js"></script>
           <link rel="stylesheet" type="text/css"
            href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" />
           <script type="text/javascript">
                   $(document).ready(function(){
                         $("#date").datepicker();
                   });
    
           </script>
      </head>
    
      <body>
    
        <div id="wrapper">
    
          <!-- Sidebar -->
         <?php
    	 include('menu.php');
    	 ?>
    
          <div id="page-wrapper">
    
            <div class="row">
              <div class="col-lg-11">
                <h1><center><font color="#819FF7"><i>Bookings</i></font></center><small></small></h1>
    			      			   
     <div class="row">
    
    <div class="col-lg-14">
    <div class="page-header">
    	</div>
    	
    			
    			    <div class="col-lg-4">
    					<h2></h2>
    					<div class="panel panel-primary">
    						<div class="panel-heading">
    							<h2 class="panel-title"><i class="fa fa-bar-chart-o"></i> Add Reservation</h2>
    						</div>
    						
    		
    			  <form id="form" class="form-wrapper" method="post" action="addreservation.php"  enctype="multipart/form-data">
    			    
                    <label>Date</label>
    				<input id="date" name="date" type="text" class="form-control" />
    	
                    <label>Name</label>
                    <input class="form-control" name="name" type="text">	
    
                    <label>Phone Number</label>
                    <input class="form-control" name="phonenumber" type="text">
    
                   <label>Number of Guests</label>
                    <select class="form-control" select id="guests" name="guests">
    				<option value="1">1</option>
    				<option value="2">2</option>
    				<option value="3">3</option>
    				<option value="4">4</option>
    				<option value="5">5</option>
    				<option value="6">6</option>
    				<option value="7">7</option>
    				<option value="8">8</option>
    				<option value="9">9</option>
    				<option value="10">10</option>
    				<option value="11">11</option>
    				<option value="12">12</option>
    				<option value="13">13</option>
    				<option value="14">14</option>
    				<option value="15">15</option>
    				<option value="16">16</option>
    				<option value="17">17</option>
    				<option value="18">18</option>
    				<option value="19">19</option>
    				<option value="20">20</option>
    
                    </select>		<br>
    				<center><input type="submit" class="btn btn-primary btn-lg" value="Book"></button></center><br>
               </form>		
    					</div>
    					
    					</div>
    			    <div class="col-lg-8">
    					<h2></h2>
    					<div class="panel panel-primary">
    						<div class="panel-heading">
    							<h2 class="panel-title"><i class="fa fa-bar-chart-o"></i>  Bookings</h2>	
    						</div>
    														<?php
    									$date = date("Y-m-d");
    									$query = mysql_query("SELECT * FROM Calendar WHERE date >= '".$date."' LIMIT 7") or die(mysql_error());
    									while($row = mysql_fetch_array($query))
    									{
    										echo $row['date'];
    										echo "<br>";
    									}
    						?>	
    					</div>
    				</div>
    <p>
    			</p>
    		</div>
    
    </div><!-- /.row -->			 
    </div>
            </div><!-- /.row -->
    
          </div><!-- /#page-wrapper -->
    
        </div><!-- /#wrapper -->
    
        <!-- JavaScript -->
        <script src="js/jquery-1.10.2.js"></script>
        <script src="js/bootstrap.js"></script>
    
      </body>
    </html>
    <?php
    }
    else {
    header('Location: index.php');
    }
    ?>

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,784
    Thanks
    6
    Thanked 1,022 Times in 995 Posts
    Quote Originally Posted by saffijeej View Post
    I have literally tried everything I could find online but withouth success.
    Apparently you’ve never found this sticky.
    saffijeej likes this.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •