SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2011
    Location
    India
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    my Date and time picker JS is not working...

    Hi,

    I am developing a webpage using twitter bootstrap frame and calling a JS date and time Picker, but it is not working as I am not JS programmer I am not getting the error..

    here is the html code:

    Code:
    <!DOCTYPE html>
    <html lang="en">
    
    <head>
    <title>B 2 B Responsive</title>
        <meta charset="utf-8">
        
        
            <link rel="icon" href="img/favicon.ico" type="image/x-icon">
            <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
    		<link rel="stylesheet" href="css/bootstrap.css" type="text/css" media="screen">
        	<link rel="stylesheet" href="css/daterangepicker-bs3.css" type="text/css" media="screen" />
            
          <script type="text/javascript" src="js/moment.js"></script>
          <script type="text/javascript" src="js/daterangepicker.js"></script>
     	  <script type="text/javascript" src="js/jquery.min.js"></script>
      
    </head>
    
    <body>
        <div class="span9">
            <div class="well">
               <form class="form-horizontal">
                 <fieldset>
                  <div class="control-group">
                    <label class="control-label" for="reservationtime">Reservation dates:</label>
                    <div class="controls">
                     <div class="input-prepend">
                       <span class="add-on"><i class="glyphicon glyphicon-calendar icon-calendar"></i></span>
                       <input type="text" style="width: 300px" name="reservation" id="reservationtime" value="08/01/2013 1:00 PM - 08/01/2013 1:30 PM"  class="span4"/>
                     </div>
                    </div>
                  </div>
                 </fieldset>
               </form>
    
               <script type="text/javascript">
               $(document).ready(function() {
                  $('#reservationtime').daterangepicker({
                    timePicker: true,
                    timePickerIncrement: 30,
                    format: 'MM/DD/YYYY h:mm A'
                  });
               });
               </script>
    
            </div>  
        </div>
    </body>
    </html>
    and uploaded link : http://jetflightz.com/responsive-tes...time-test.html

    I am taking this date and time picker from this page here it is working perfectly, but why it is not working on my above page...

    http://jetflightz.com/responsive-tes.../examples.html

    your early reply appreciated..

    Regards
    Shahzad
    Last edited by Pullo; Oct 3, 2013 at 11:10. Reason: Added code tags

  2. #2
    SitePoint Addict bronze trophy
    Join Date
    Sep 2005
    Posts
    317
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    You should call the jquery include before any other javascript files that use jquery.

    Code:
    <script type="text/javascript" src="js/jquery.min.js"></script>
    Put that before your other JS files.


Tags for this Thread

Bookmarks

Posting Permissions

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