1

The Bootstrap datepicker from Eyecom doesn't seems to work. I'm following various questions from here, for example:

But without avail. What am I doing wrong? I click the input box and it doesn't show me the datepicker.

Here's my code:

<!DOCTYPE>
<html>
    <head>
       <meta charset="utf-8">
       <meta name="viewport" content="width=device-width, initial-scale=1.0">
       <title>Test</title>
       <link rel="stylesheet" type="text/css" href="../css/datepicker.css">
       <link rel="stylesheet" type="text/css" href="../css/bootstrap.css">
       <link rel="stylesheet" type="text/css" href="../css/bootstrap-responsive.css">
    </head>

    <body>
      <input type="text" id='datetimepicker1'>       
      <script type="text/javascript" src="../js/jquery.js"></script>
      <script type="text/javascript" src="../js/bootstrap-datepicker.js"></script>
      <script type="text/javascript" src="../js/bootstrap.js"></script>
      <script type="text/javascript">
         $(function () {
             $('#datetimepicker1').datepicker();
          });
      </script>
   </body>
</html>

It should work! Any help?

Community
  • 1
  • 1
SamyCode
  • 928
  • 3
  • 14
  • 33
  • 1
    Any errors in the [JavaScript console](http://stackoverflow.com/questions/4743730/what-is-console-log-and-how-do-i-use-it) of your browser? – mccannf Mar 05 '14 at 23:12
  • Also, I would put the `datepicker.css` after `bootstrap.css` in your html - just to be on the safe side. – mccannf Mar 05 '14 at 23:14

1 Answers1

0

Please refer to http://jsbin.com/lerojivu/1/edit

The DIV includes INPUT and SAPN element is necesaary for datepicker to be initiated.

Cliff Liu
  • 186
  • 1
  • 6