How can I use the Twitter Bootstrap date picker? I used the code below but its not working.
<html>
<head>
<title>DatePicker Demo</title>
<script src="js/jquery-1.7.1.js"></script>
<link href="css/datepicker.less" rel="stylesheet" type="text/css" />
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="js/bootstrap-datepicker.js"></script>
</script>
</head>
<body>
<form >
<div class="input">
<input class="small" type="text" value="01/05/2011" data-datepicker="datepicker">
</div>
</form>
</body>
</html>
You used
data-datepicker="datepicker"
It must bedate-provide="datepicker"
Also, you included 2 bootstrap stylesheets
bootstrap.css
andbootstrap.min.css
I also prefer to use
bootstrap-datepicker3.min.css
thandatepicker.less
Full Html:
I was also facing the same problem for twitter-bootstrap.
As eternicode/bootstrap-datepicker is incompatible with jQuery UI.
But twitter-bootstrap is working fine for vitalets/bootstrap-datepicker even with jQuery UI.
The most popular bootstrap date picker is currently: https://github.com/eternicode/bootstrap-datepicker (thanks to @dentarg for digging it up)
A simple instantiation only requires:
HTML
Javascript
See a simple example here https://jsfiddle.net/k6qsm5no/1/ or the full docs here http://bootstrap-datepicker.readthedocs.org/en/latest/
Twitter Bootstrap is incompatible with jQuery UI styles at the moment.
https://github.com/twitter/bootstrap/issues/156
This might help you https://github.com/sferik/rails_admin ( http://rails-admin-tb.herokuapp.com/admin/drafts/new )
add
to the style sheet in
Some people posted the link to this bootstrap-datepicker.js implementation. I used that one in the following way, it works with Bootstrap 3.
This is the markup I used:
This is the javascript:
I also included the javascript file downloaded from the link above, along with it's css file, and of course, you should remove any bootstrap grid classes like the
col-md-3
to suit your needs.