How to set the date-time in the form for twitter-bootstrap

I am using the twitter bootstrap and I need to set the input as date-time for one of the labels in the form and I am not sure how to do it..

I am following this:

https://github.com/eternicode/bootstrap-datepicker and i am trying to do the one with the options

I tried this:

 <link rel="stylesheet" type="text/css" href=""{{ STATIC_URL }}/css/datepicker.css">
 <script src = "{{STATIC_URL}}js/Datepicker.js></script>
 <script>
  $('#datepicker').datepicker({
    format: 'mm-dd-yyyy'
  });
 </script>
 <label>Created:</label>
 <input type="text" value="02-16-2012" id="datepicker" rel="datapicker" />
 <br/><br/>

Besides, i would take the label to show the current date instead of the value that i type i initially.

Need some help on it. Would really appreciate any help..

But it is not working... Not sure what the error was...

Edited Version:

 <link type="text/css" rel="stylesheet" href="{{ STATIC_URL }}/css/bootstrap.css">
 <link rel="stylesheet" type="text/css" href=""{{ STATIC_URL }}/css/datepicker.css">
  <script>
   $('#datepicker').datepicker({
      format: 'mm-dd-yyyy'
    });
  </script>
  <script src = "{{STATIC_URL}}js/Datepicker.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>


    <label>Created:</label>
    <input type="text" value ="06/11/2012"id="datepicker"/>
    <br/><br/>

Answers


$('#datepicker').datepicker({
format: 'mm-dd-yyyy'
});

is jquery so add

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> 

to your code.

It works for me http://jsfiddle.net/baptme/9r2E4/

Replace

<input type="text" value ="06/11/2012"id="datepicker"/>

With

<input type="text" value="06-11-2012" id="datepicker"/>

Need Your Help

LoadError: no such file to load -- openssl/dummy

ruby ubuntu amazon-web-services rubygems jruby

I am trying to run a jruby application. Whenever I start the jruby script, the app throws out an error which says