javascript - Bootstrap datepicker dependencies -


boostrap datepicker css seems broken.

i tried many way, including link, moment.js, less, many bootstrap-datepicker version /js / css, nothing work.

actually have :

	  $('#datepicker2').datepicker({  		todayhighlight: true,  		weekstart: 1  	});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>  <script src="https://code.jquery.com/ui/1.12.0/jquery-ui.min.js"></script>    <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.js"></script>  <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>    <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet"/>    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/js/bootstrap-datetimepicker.min.js"></script>  <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/css/bootstrap-datepicker.standalone.min.css" rel="stylesheet"/>    <div class="row show-grid">    <!--- calendar --->    <div class="col-xs-6 col-md-4">      <div class="panel panel-default" >        <div id="datepicker2" style="margin-left: 20%;"><br/></div>        <br/>      </div>    </div>  </div>

i missed something, spend hours, witch dependencies not ? think mixed datetimepicker datepicker or this.

i should have :

enter image description here

you including wrong library reason you're facing problem.

here's working example you.

$(function () {  $('.datepicker').datepicker({      format: 'mm/dd/yyyy',  });  });
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet"/>    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.7.1/css/bootstrap-datepicker3.standalone.min.css" />  <script    src="https://code.jquery.com/jquery-2.2.4.min.js"    integrity="sha256-bbhdlvqf/xty9gja0dq3hiwqf8lacrtxxzkrutelt44="    crossorigin="anonymous"></script>    <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.js"></script>  <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.7.1/js/bootstrap-datepicker.min.js"></script>        <div class="container">      <div class="row">          <div class='col-sm-6'>             <div class="input-group date" data-provide="datepicker">                <input type="text" class="form-control">                <div class="input-group-addon">                    <span class="glyphicon glyphicon-th"></span>                </div>            </div>          </div>      </div>  </div>


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -