title: Bootstrap 4 datepicker
body: <p>I want to use datepicker <a href="https://bootstrap-datepicker.readthedocs.io/en/latest/index.html" rel="noreferrer">https://bootstrap-datepicker.readthedocs.io/en/latest/index.html</a> with Bootstrap 4.</p>
  
  <p>Following the examples on above page, I can make it work with Bootstrap 3.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"&gt;
  
      &lt;link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.7.1/css/bootstrap-datepicker.min.css" rel="stylesheet"/&gt;
      &lt;link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;main class="container"&gt;
      &lt;div class="row" style="padding-top: 100px"&gt;
          &lt;div class="col"&gt;
              &lt;input data-date-format="dd/mm/yyyy" id="datepicker"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/main&gt;
  
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.7.1/js/bootstrap-datepicker.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      $('#datepicker').datepicker({
          weekStart: 1,
          daysOfWeekHighlighted: "6,0",
          autoclose: true,
          todayHighlight: true,
      });
      $('#datepicker').datepicker("setDate", new Date());
  &lt;/script&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Using this code datepicker appears correctly.</p>
  
  <p>But doing the same with Bootstrap 4:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"&gt;
  
      &lt;link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.7.1/css/bootstrap-datepicker.min.css" rel="stylesheet"/&gt;
      &lt;link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"&gt;&lt;/head&gt;
  &lt;body&gt;
  
  &lt;main class="container"&gt;
      &lt;div class="row" style="padding-top: 100px"&gt;
          &lt;div class="col"&gt;
              &lt;input data-date-format="dd/mm/yyyy" id="datepicker"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/main&gt;
  
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.7.1/js/bootstrap-datepicker.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;
      $('#datepicker').datepicker({
          weekStart: 1,
          daysOfWeekHighlighted: "6,0",
          autoclose: true,
          todayHighlight: true,
      });
      $('#datepicker').datepicker("setDate", new Date());
  &lt;/script&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Makes it look less professional:</p>
  
  <p><a href="https://i.stack.imgur.com/mbVFO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/mbVFO.png" alt="enter image description here"></a></p>
  
  <p>Looks like font and spacing are messed up in Bootstrap 4 version.</p>
  
  <p>How can I get same look and feel of datepicker in Bootstrap 4?</p>
  
  <p>Thanks</p>